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)
set(REQUIRED_QT_VERSION "5.15.0")

View file

@ -214,9 +214,11 @@ target_link_libraries(nextcloudsync
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)
find_package(Qt5 REQUIRED COMPONENTS Widgets Svg)
target_link_libraries(nextcloudsync PUBLIC Qt5::Widgets Qt5::Svg qt5keychain)
target_link_libraries(nextcloudsync PUBLIC qt5keychain)
endif()
if(Inotify_FOUND)

View file

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