Compare commits

...

10 Commits

Author SHA1 Message Date
Laurent Montel
a244293f9f Fix port deprecated [=] operator in c++20 2023-08-30 10:52:20 +02:00
Tobias Fella
50ad18d095 Merge branch 'master' into kf6 2023-08-29 22:57:12 +02:00
Tobias Fella
ca53d163eb Merge branch 'master' into kf6 2023-08-29 19:56:46 +02:00
James Graham
3bac752463 Merge branch 'master' into kf6 2023-08-28 14:04:17 +01:00
Tobias Fella
2ba3d970e1 Merge branch 'master' into kf6 2023-08-28 12:05:45 +02:00
Tobias Fella
a19502ca40 Fix KF6 crash in emoji completion 2023-08-28 09:46:47 +00:00
Tobias Fella
1b2919587a Fix opening CreateSpaceDialog in Qt6 2023-08-28 00:24:42 +02:00
Tobias Fella
e5420973f5 Merge branch 'master' into kf6 2023-08-27 21:49:53 +02:00
Tobias Fella
931d20fecd Merge branch 'master' into kf6 2023-08-27 19:18:07 +02:00
James Graham
725c6c30ce Get KF6 Working
Minimal set of changes so that a compiled version of NeoChat on KF6 will run and at least be functional.
2023-08-27 16:17:56 +00:00
7 changed files with 19 additions and 19 deletions

View File

@@ -145,7 +145,7 @@ void CompletionModel::updateCompletion()
m_filterModel->setFullText(m_fullText);
m_filterModel->setFilterText(m_text);
m_filterModel->invalidate();
} else if (text().startsWith(QLatin1Char(':')) && !text()[1].isUpper()
} else if (text().startsWith(QLatin1Char(':')) && text().size() > 1 && !text()[1].isUpper()
&& (m_fullText.indexOf(QLatin1Char(':'), 1) == -1
|| (m_fullText.indexOf(QLatin1Char(' ')) != -1 && m_fullText.indexOf(QLatin1Char(':'), 1) > m_fullText.indexOf(QLatin1Char(' '), 1)))) {
m_filterModel->setSourceModel(m_emojiModel);

View File

@@ -31,15 +31,15 @@ Kirigami.Page {
imageDoc.crop(selectionTool.selectionX / ratioX, selectionTool.selectionY / ratioY, selectionTool.selectionWidth / ratioX, selectionTool.selectionHeight / ratioY);
}
actions {
left: Kirigami.Action {
actions: [
Kirigami.Action {
id: undoAction
text: i18nc("@action:button Undo modification", "Undo")
icon.name: "edit-undo"
onTriggered: imageDoc.undo();
visible: imageDoc.edited
}
main: Kirigami.Action {
},
Kirigami.Action {
id: okAction
text: i18nc("@action:button Accept image modification", "Accept")
icon.name: "dialog-ok"
@@ -54,7 +54,7 @@ Kirigami.Page {
}
}
}
}
]

View File

@@ -122,10 +122,10 @@ Kirigami.ScrollablePage {
title: i18nc("@title:window", "Add server")
onSheetOpenChanged: if (!serverUrlField.isValidServer && !sheetOpen) {
onOpened: if (!serverUrlField.isValidServer && !opened) {
serverField.currentIndex = 0
server = serverField.currentValue
} else if (sheetOpen) {
} else if (opened) {
serverUrlField.forceActiveFocus()
}

View File

@@ -40,7 +40,7 @@ RowLayout {
text: i18n("Create a Space")
icon.name: "list-add"
onTriggered: {
let dialog = createSpaceDialog.createObject(root.overlay);
let dialog = createSpaceDialog.createObject(applicationWindow().overlay);
dialog.open()
}
}

View File

@@ -27,13 +27,13 @@ Kirigami.Page {
focus: true
padding: 0
actions {
main: Kirigami.Action {
actions: [
Kirigami.Action {
visible: Kirigami.Settings.isMobile || !applicationWindow().pageStack.wideMode
icon.name: "view-right-new"
onTriggered: applicationWindow().openRoomDrawer()
}
}
]
KeyNavigation.left: pageStack.get(0)

View File

@@ -31,12 +31,12 @@ Kirigami.ScrollablePage {
title: roomInformation.title
actions {
main: Kirigami.Action {
actions: [
Kirigami.Action {
icon.name: "settings-configure"
onTriggered: applicationWindow().pageStack.pushDialogLayer('qrc:/Categories.qml', {room: root.room}, { title: i18n("Room Settings") })
}
}
]
RoomInformation {
id: roomInformation

View File

@@ -21,9 +21,9 @@ Registration::Registration()
{
auto server = new QTcpServer(this);
server->listen(QHostAddress("127.0.0.1"_ls), 20847);
connect(server, &QTcpServer::newConnection, this, [=]() {
connect(server, &QTcpServer::newConnection, this, [this, server]() {
auto conn = server->nextPendingConnection();
connect(conn, &QIODevice::readyRead, this, [=]() {
connect(conn, &QIODevice::readyRead, this, [this, conn]() {
auto code =
"HTTP/1.0 200\nContent-type: text/html\n\n<html><head><script src=\"https://www.google.com/recaptcha/api.js\" async defer></script></head><body style=\"background: #00000000\"><center><div class=\"g-recaptcha\" data-sitekey=\"%1\"></div></center></body></html>"_ls
.arg(m_recaptchaSiteKey);
@@ -86,7 +86,7 @@ void Registration::registerAccount()
};
}
auto job = m_connection->callApi<NeoChatRegisterJob>("user"_ls, authData, m_username, m_password, QString(), QString(), true);
connect(job, &BaseJob::result, this, [=]() {
connect(job, &BaseJob::result, this, [this, job]() {
if (job->status() == BaseJob::Success) {
setNextStep("loading"_ls);
auto connection = new NeoChatConnection(this);
@@ -332,7 +332,7 @@ void Registration::registerEmail()
data.sendAttempt = 0;
auto job = m_connection->callApi<RequestTokenToRegisterEmailJob>(data);
connect(job, &BaseJob::finished, this, [=]() {
connect(job, &BaseJob::finished, this, [this, job]() {
m_sid = job->jsonData()["sid"_ls].toString();
});
}