Skip to content

Commit

Permalink
Merge pull request #6370 from nextcloud/ci/partialBuildFixForTokenAut…
Browse files Browse the repository at this point in the history
…hOnlyBuild

partial build fix when TOKEN_AUTH_ONLY is enabled at configure time
  • Loading branch information
mgallien authored Jan 29, 2024
2 parents e022231 + b8ee9db commit 120d67c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
6 changes: 4 additions & 2 deletions src/libsync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,17 @@ void ConfigFile::saveGeometry(QWidget *w)
settings.beginGroup(w->objectName());
settings.setValue(QLatin1String(geometryC), w->saveGeometry());
settings.sync();
#else
Q_UNUSED(w)
#endif
}

void ConfigFile::restoreGeometry(QWidget *w)
{
#ifndef TOKEN_AUTH_ONLY
w->restoreGeometry(getValue(geometryC, w->objectName()).toByteArray());
#else
Q_UNUSED(w)
#endif
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 120d67c

Please sign in to comment.