fix compilation issues after rebase
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 5 Apr 2024 10:12:56 +0000 (12:12 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Fri, 26 Apr 2024 07:05:12 +0000 (09:05 +0200)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/CMakeLists.txt
src/common/remotepermissions.cpp
src/gui/CMakeLists.txt
src/gui/accountstate.cpp
src/gui/application.cpp
src/gui/folder.cpp
src/gui/folder.h
src/gui/generalsettings.cpp
src/gui/owncloudsetupwizard.cpp
src/libsync/CMakeLists.txt
src/libsync/foldermetadata.cpp

index 3f01b070ad8218c79364ff22b4e76e48467c111e..75c6f458295cf540389e1d6fc98c48fee9d557ab 100644 (file)
@@ -51,19 +51,6 @@ else()
     )
 endif()
 
-find_package(Qt${QT_MAJOR_VERSION}WebEngine ${REQUIRED_QT_VERSION} CONFIG QUIET)
-if(NOT BUILD_WITH_WEBENGINE)
-    set_package_properties(Qt${QT_MAJOR_VERSION}WebEngine PROPERTIES
-        DESCRIPTION "Qt${QT_MAJOR_VERSION} WebEngine component."
-        TYPE RECOMMENDED
-    )
-else()
-    set_package_properties(Qt${QT_MAJOR_VERSION}WebEngine PROPERTIES
-        DESCRIPTION "Qt${QT_MAJOR_VERSION} WebEngine component."
-        TYPE REQUIRED
-    )
-endif()
-
 find_package(Qt${QT_VERSION_MAJOR}WebEngineCore ${REQUIRED_QT_VERSION} CONFIG QUIET)
 if(APPLE)
     set_package_properties(Qt${QT_VERSION_MAJOR}WebEngineCore PROPERTIES
index bfe93922a679cf943020c169a797639648bf78bc..18075fc997bf6c8699e658c014d986accc526c3d 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "remotepermissions.h"
 
+#include <QVariant>
 #include <QLoggingCategory>
 
 #include <cstring>
index d9f29c808a96183ae561f07088dd321f9cec2808..a10ccbe1c563d1b50544a52403204e00b937f88c 100644 (file)
@@ -1,18 +1,7 @@
 project(gui)
 find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS Widgets Svg Qml Quick QuickControls2 QuickWidgets Xml Network)
-find_package(KF5Archive REQUIRED)
-find_package(KF5GuiAddons)
-
-if(QUICK_COMPILER)
-    if (${QT_VERSION_MAJOR} STREQUAL "5")
-        set(REQUIRED_QT_VERSION "5.15.0")
-        find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED QuickCompiler)
-        set_package_properties(Qt5QuickCompiler PROPERTIES
-                DESCRIPTION "Compile QML at build time"
-                TYPE REQUIRED
-        )
-    endif()
-endif()
+find_package(KF6Archive REQUIRED)
+find_package(KF6GuiAddons)
 
 if (NOT TARGET Qt::GuiPrivate)
     message(FATAL_ERROR "Could not find GuiPrivate component of Qt. It might be shipped as a separate package, please check that.")
@@ -58,11 +47,7 @@ set(client_UI_SRCS
     wizard/welcomepage.ui
 )
 
-if(Qt5QuickCompiler_FOUND)
-    qtquick_compiler_add_resources(client_UI_SRCS ../../resources.qrc ${CMAKE_SOURCE_DIR}/theme.qrc)
-else()
-    qt_add_resources(client_UI_SRCS ../../resources.qrc ${CMAKE_SOURCE_DIR}/theme.qrc)
-endif()
+qt_add_resources(client_UI_SRCS ../../resources.qrc ${CMAKE_SOURCE_DIR}/theme.qrc)
 
 set(client_SRCS
     accountmanager.h
@@ -406,7 +391,7 @@ set( final_src
 )
 
 if(Qt${QT_MAJOR_VERSION}Keychain_FOUND)
-    list(APPEND libsync_LINK_TARGETS qt5keychain)
+    list(APPEND libsync_LINK_TARGETS Qt6::keychain)
 endif()
 
 # add executable icon on windows and osx
@@ -568,13 +553,13 @@ target_link_libraries(nextcloudCore
   Qt::Quick
   Qt::QuickControls2
   Qt::QuickWidgets
-  KF5::Archive
+  KF6::Archive
   )
 
-if(KF5GuiAddons_FOUND)
+if(KF6GuiAddons_FOUND)
   target_link_libraries(nextcloudCore
     PUBLIC
-    KF5::GuiAddons
+    KF6::GuiAddons
   )
   add_definitions(-DHAVE_KGUIADDONS)
 endif()
@@ -591,7 +576,7 @@ foreach(FILE IN LISTS client_UI_SRCS)
        set_property(SOURCE ${FILE} PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)
 endforeach()
 
-if(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND)
+if(Qt6WebEngine_FOUND AND Qt6WebEngineWidgets_FOUND)
   target_link_libraries(nextcloudCore PUBLIC Qt::WebEngineWidgets)
 endif()
 
index 59548de9d2b17593965aaa5081f34fc0ca6b4030..c76754bf3bbeeccb48212f322c659d0381e5a1cd 100644 (file)
@@ -321,7 +321,7 @@ void AccountState::checkConnectivity()
 
         // If we don't reset the ssl config a second CheckServerJob can produce a
         // ssl config that does not have a sensible certificate chain.
-        account()->setSslConfiguration(QSslConfiguration());
+        account()->setSslConfiguration(QSslConfiguration::defaultConfiguration());
         //#endif
         conValidator->checkServerAndAuth();
     }
index ffa04c70e8b0919fe56a1aa0c122cfd9fdeb940b..e64949dba42b5cf35d318bea0dff7a58eea76b35 100644 (file)
@@ -530,7 +530,7 @@ void Application::setupConfigFile()
     QT_WARNING_POP
     setApplicationName(_theme->appName());
 
-    auto oldDir = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
+    auto oldDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
 
     // macOS 10.11.x does not like trailing slash for rename/move.
     if (oldDir.endsWith('/')) {
index 365acd513c0c3391e11c1000478b823fa51ca946..57284fd3f5cc9cf15f028ef9d5ad53e2a420edb7 100644 (file)
@@ -572,6 +572,7 @@ void Folder::slotWatchedPathChanged(const QStringView &path, const ChangeReason
             if (!pinState || *pinState != PinState::Excluded) {
                 if (!_vfs->setPinState(relativePath.toString(), PinState::Excluded)) {
                     qCWarning(lcFolder) << "Could not set pin state of" << relativePath << "to excluded";
+                }
             }
             return;
         } else {
index 6ea794625bfa6b87245bd56ea1216954c65b7dcd..e3bed9f7f92e82828190f103dcfeecb16d934fcf 100644 (file)
@@ -26,6 +26,8 @@
 #include <QObject>
 #include <QStringList>
 #include <QUuid>
+#include <QSet>
+
 #include <set>
 #include <chrono>
 #include <memory>
index 2112d386d2b2d7b5675b8e0282d1006eb8b62044..b57745fc2c9b20b34b177c08813dfae9b7d28723 100644 (file)
@@ -310,7 +310,7 @@ void GeneralSettings::slotUpdateInfo()
     if (ocupdater) {
         connect(ocupdater, &OCUpdater::downloadStateChanged, this, &GeneralSettings::slotUpdateInfo, Qt::UniqueConnection);
         connect(_ui->restartButton, &QAbstractButton::clicked, ocupdater, &OCUpdater::slotStartInstaller, Qt::UniqueConnection);
-        connect(_ui->restartButton, &QAbstractButton::clicked, qApp, &QApplication::quit, Qt::UniqueConnection);
+        //connect(_ui->restartButton, &QAbstractButton::clicked, qApp, &QApplication::quit, Qt::UniqueConnection);
 
         QString status = ocupdater->statusString(OCUpdater::UpdateStatusStringFormat::Html);
         Theme::replaceLinkColorStringBackgroundAware(status);
index 5b4e6e54ac9b3fbe4e013ff74dcc0eb289c458fe..c96f0351d0f7c6ac9ca54133f202a7caedd457e0 100644 (file)
@@ -162,7 +162,7 @@ void OwncloudSetupWizard::slotCheckServer(const QString &urlString)
 
     // And also reset the QSslConfiguration, for the same reason (#6832)
     // Here the client certificate is added, if any. Later it'll be in HttpCredentials
-    account->setSslConfiguration(QSslConfiguration());
+    account->setSslConfiguration(QSslConfiguration::defaultConfiguration());
     auto sslConfiguration = account->getOrCreateSslConfig(); // let Account set defaults
     if (!_ocWizard->_clientSslCertificate.isNull()) {
         sslConfiguration.setLocalCertificate(_ocWizard->_clientSslCertificate);
index e163352167327ebc904350bf6c0c5c298bf3a280..299e62a088fe53bed75d935774801d9c07f83b40 100644 (file)
@@ -1,5 +1,5 @@
 project(libsync)
-find_package(KF5Archive REQUIRED)
+find_package(KF6Archive REQUIRED)
 include(DefinePlatformDefaults)
 
 set(CMAKE_AUTOMOC TRUE)
@@ -211,7 +211,7 @@ target_link_libraries(nextcloudsync
   Qt::WebSockets
   Qt::Xml
   Qt::Sql
-  KF5::Archive
+  KF6::Archive
   Qt::Core5Compat
 )
 
@@ -222,9 +222,6 @@ target_compile_features(nextcloudsync
 
 target_compile_definitions(nextcloudsync PRIVATE OPENSSL_SUPPRESS_DEPRECATED)
 
-find_package(Qt5 REQUIRED COMPONENTS Gui Widgets Svg)
-target_link_libraries(nextcloudsync PUBLIC Qt5::Gui Qt5::Widgets Qt5::Svg)
-
 if (NOT TOKEN_AUTH_ONLY)
     find_package(Qt${QT_MAJOR_VERSION} COMPONENTS REQUIRED Widgets Svg)
     target_link_libraries(nextcloudsync PUBLIC Qt::Widgets Qt::Svg Qt${QT_MAJOR_VERSION}Keychain::Qt${QT_MAJOR_VERSION}Keychain)
index 43740933252441d33a19624a2d09e45971aa95e2..6536e283f4392a7791c07dea6c7a8a9b42e4b28a 100644 (file)
@@ -599,7 +599,7 @@ QByteArray FolderMetadata::encryptedMetadata()
 
     QJsonObject files, folders;
     for (auto it = _files.constBegin(), end = _files.constEnd(); it != end; ++it) {
-        const auto file = convertFileToJsonObject(it);
+        const auto file = convertFileToJsonObject(&(*it));
         if (file.isEmpty()) {
             qCDebug(lcCseMetadata) << "Metadata generation failed for file" << it->encryptedFilename;
             return {};