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

Bugfix/autostart #6342

Merged
merged 13 commits into from
Jan 22, 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
14 changes: 14 additions & 0 deletions src/common/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,18 @@ set(common_SOURCES
${CMAKE_CURRENT_LIST_DIR}/syncfilestatus.cpp
)

if(WIN32)
list(APPEND common_SOURCES
${CMAKE_CURRENT_LIST_DIR}/utility_win.cpp
)
elseif(APPLE)
list(APPEND common_SOURCES
${CMAKE_CURRENT_LIST_DIR}/utility_mac.mm
)
elseif(UNIX AND NOT APPLE)
list(APPEND common_SOURCES
${CMAKE_CURRENT_LIST_DIR}/utility_unix.cpp
)
endif()

configure_file(${CMAKE_CURRENT_LIST_DIR}/vfspluginmetadata.json.in ${CMAKE_CURRENT_BINARY_DIR}/vfspluginmetadata.json)
44 changes: 0 additions & 44 deletions src/common/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <QSysInfo>
#include <qrandom.h>


#ifdef Q_OS_UNIX
#include <sys/statvfs.h>
#include <sys/types.h>
Expand All @@ -50,14 +49,6 @@
#include <cstdarg>
#include <cstring>

#if defined(Q_OS_WIN)
#include "utility_win.cpp"
#elif defined(Q_OS_MAC)
#include "utility_mac.cpp"
#else
#include "utility_unix.cpp"
#endif

namespace {
constexpr auto bytes = 1024;
constexpr auto kilobytes = bytes;
Expand Down Expand Up @@ -112,15 +103,6 @@ QString Utility::formatFingerprint(const QByteArray &fmhash, bool colonSeparated
return fp;
}

void Utility::setupFavLink(const QString &folder)
{
setupFavLink_private(folder);
}

void Utility::removeFavLink(const QString &folder)
{
removeFavLink_private(folder);
}

QString Utility::octetsToString(const qint64 octets)
{
Expand Down Expand Up @@ -202,26 +184,6 @@ QByteArray Utility::friendlyUserAgentString()
return userAgent.toUtf8();
}

bool Utility::hasSystemLaunchOnStartup(const QString &appName)
{
#if defined(Q_OS_WIN)
return hasSystemLaunchOnStartup_private(appName);
#else
Q_UNUSED(appName)
return false;
#endif
}

bool Utility::hasLaunchOnStartup(const QString &appName)
{
return hasLaunchOnStartup_private(appName);
}

void Utility::setLaunchOnStartup(const QString &appName, const QString &guiName, bool enable)
{
setLaunchOnStartup_private(appName, guiName, enable);
}

qint64 Utility::freeDiskSpace(const QString &path)
{
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
Expand Down Expand Up @@ -406,12 +368,6 @@ QByteArray Utility::normalizeEtag(QByteArray etag)
return etag;
}

bool Utility::hasDarkSystray()
{
return hasDarkSystray_private();
}


QString Utility::platformName()
{
return QSysInfo::prettyProductName();
Expand Down
2 changes: 1 addition & 1 deletion src/common/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace Utility {
*/
OCSYNC_EXPORT bool hasSystemLaunchOnStartup(const QString &appName);
OCSYNC_EXPORT bool hasLaunchOnStartup(const QString &appName);
OCSYNC_EXPORT void setLaunchOnStartup(const QString &appName, const QString &guiName, bool launch);
OCSYNC_EXPORT void setLaunchOnStartup(const QString &appName, const QString &guiName, const bool launch);
OCSYNC_EXPORT uint convertSizeToUint(size_t &convertVar);
OCSYNC_EXPORT int convertSizeToInt(size_t &convertVar);

Expand Down
146 changes: 0 additions & 146 deletions src/common/utility_mac.cpp

This file was deleted.

Loading
Loading