diff --git a/CMakeLists.txt b/CMakeLists.txt index ab9f329..0edc343 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/src/handlers/Authenticator.cpp b/src/handlers/Authenticator.cpp index 5aeae1a..7ffa19f 100644 --- a/src/handlers/Authenticator.cpp +++ b/src/handlers/Authenticator.cpp @@ -8,7 +8,7 @@ #include #include -void Authenticator::requestLogin(QString &email, QString &pass, QString &twoFA) +void Authenticator::requestLogin(QString email, QString pass, QString twoFA) { QNetworkRequest req(DiscordAPI::login); req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); diff --git a/src/handlers/Authenticator.hpp b/src/handlers/Authenticator.hpp index e369dd9..af77326 100644 --- a/src/handlers/Authenticator.hpp +++ b/src/handlers/Authenticator.hpp @@ -8,8 +8,7 @@ class Authenticator : public QObject Q_OBJECT public: - Q_INVOKABLE void requestLogin(QString &email, QString &pass, - QString &twoFA); + Q_INVOKABLE void requestLogin(QString email, QString pass, QString twoFA); Q_INVOKABLE void requestLogout(); signals: diff --git a/src/qml/ChannelsBar.qml b/src/qml/ChannelsBar.qml index d41a95e..4efc03a 100644 --- a/src/qml/ChannelsBar.qml +++ b/src/qml/ChannelsBar.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Controls.Material 2.15 +import QtQuick +import QtQuick.Controls +import QtQuick.Controls.Material Rectangle { color: Material.backgroundColor @@ -20,8 +20,8 @@ Rectangle { boundsBehavior: ListView.StopAtBounds delegate: Text { text: nameRole - color: hmi.guildsModel.channelsModel.selected === - index ? Material.accentColor : Material.foreground + color: hmi.guildsModel.channelsModel.selected + === index ? Material.accentColor : Material.foreground MouseArea { anchors.fill: parent @@ -30,4 +30,4 @@ Rectangle { } } } -} \ No newline at end of file +} diff --git a/src/qml/Login.qml b/src/qml/Login.qml index df97893..5ea089b 100644 --- a/src/qml/Login.qml +++ b/src/qml/Login.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Controls.Material 2.15 +import QtQuick +import QtQuick.Controls +import QtQuick.Controls.Material Rectangle { @@ -85,4 +85,4 @@ Rectangle { text: qsTr("Login") onClicked: auth.requestLogin(txtEmail.text, txtPass.text, txt2FA.text) } -} \ No newline at end of file +} diff --git a/src/qml/UserInfoBar.qml b/src/qml/UserInfoBar.qml index 989f94e..5fec3a8 100644 --- a/src/qml/UserInfoBar.qml +++ b/src/qml/UserInfoBar.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Controls.Material 2.15 +import QtQuick +import QtQuick.Controls +import QtQuick.Controls.Material Rectangle { color: Material.backgroundColor @@ -39,4 +39,4 @@ Rectangle { onClicked: auth.requestLogout() } } -} \ No newline at end of file +} diff --git a/src/qml/main.qml b/src/qml/main.qml index 807149e..67c6661 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 +import QtQuick +import QtQuick.Window +import QtQuick.Controls ApplicationWindow { width: 640 @@ -79,4 +79,4 @@ ApplicationWindow { popupMessageError.message = qsTr(errorMessage) } } -} \ No newline at end of file +}