Merge pull request #6370 from nextcloud/ci/partialBuildFixForTokenAuthOnlyBuild

partial build fix when TOKEN_AUTH_ONLY is enabled at configure time
This commit is contained in:
Matthieu Gallien 2024-01-29 16:56:28 +01:00 committed by GitHub
commit 120d67cc3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 6 deletions

View file

@ -1,7 +1,3 @@
# TODO: OSX and LIB_ONLY seem to require this to go to binary dir only
if(NOT TOKEN_AUTH_ONLY)
endif()
include(ECMEnableSanitizers) include(ECMEnableSanitizers)
set(REQUIRED_QT_VERSION "5.15.0") set(REQUIRED_QT_VERSION "5.15.0")

View file

@ -214,9 +214,11 @@ target_link_libraries(nextcloudsync
KF5::Archive KF5::Archive
) )
find_package(Qt5 REQUIRED COMPONENTS Gui Widgets Svg)
target_link_libraries(nextcloudsync PUBLIC Qt5::Gui Qt5::Widgets Qt5::Svg)
if (NOT TOKEN_AUTH_ONLY) if (NOT TOKEN_AUTH_ONLY)
find_package(Qt5 REQUIRED COMPONENTS Widgets Svg) target_link_libraries(nextcloudsync PUBLIC qt5keychain)
target_link_libraries(nextcloudsync PUBLIC Qt5::Widgets Qt5::Svg qt5keychain)
endif() endif()
if(Inotify_FOUND) if(Inotify_FOUND)

View file

@ -285,6 +285,8 @@ void ConfigFile::saveGeometry(QWidget *w)
settings.beginGroup(w->objectName()); settings.beginGroup(w->objectName());
settings.setValue(QLatin1String(geometryC), w->saveGeometry()); settings.setValue(QLatin1String(geometryC), w->saveGeometry());
settings.sync(); settings.sync();
#else
Q_UNUSED(w)
#endif #endif
} }
@ -292,6 +294,8 @@ void ConfigFile::restoreGeometry(QWidget *w)
{ {
#ifndef TOKEN_AUTH_ONLY #ifndef TOKEN_AUTH_ONLY
w->restoreGeometry(getValue(geometryC, w->objectName()).toByteArray()); w->restoreGeometry(getValue(geometryC, w->objectName()).toByteArray());
#else
Q_UNUSED(w)
#endif #endif
} }
@ -306,6 +310,8 @@ void ConfigFile::saveGeometryHeader(QHeaderView *header)
settings.beginGroup(header->objectName()); settings.beginGroup(header->objectName());
settings.setValue(QLatin1String(geometryC), header->saveState()); settings.setValue(QLatin1String(geometryC), header->saveState());
settings.sync(); settings.sync();
#else
Q_UNUSED(header)
#endif #endif
} }
@ -319,6 +325,8 @@ void ConfigFile::restoreGeometryHeader(QHeaderView *header)
QSettings settings(configFile(), QSettings::IniFormat); QSettings settings(configFile(), QSettings::IniFormat);
settings.beginGroup(header->objectName()); settings.beginGroup(header->objectName());
header->restoreState(settings.value(geometryC).toByteArray()); header->restoreState(settings.value(geometryC).toByteArray());
#else
Q_UNUSED(header)
#endif #endif
} }