Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partial build fix when TOKEN_AUTH_ONLY is enabled at configure time #6370

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading