Skip to content

Commit

Permalink
Merge pull request #6372 from nextcloud/backport/6342/stable-3.10
Browse files Browse the repository at this point in the history
[stable-3.10] Bugfix/autostart
  • Loading branch information
mgallien authored Jan 22, 2024
2 parents fce65c6 + 8c42451 commit 694fa3c
Show file tree
Hide file tree
Showing 11 changed files with 342 additions and 235 deletions.
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 OCC {

Q_LOGGING_CATEGORY(lcUtility, "nextcloud.sync.utility", QtInfoMsg)
Expand Down Expand Up @@ -104,15 +95,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(qint64 octets)
{
Expand Down Expand Up @@ -200,26 +182,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 @@ -404,12 +366,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

0 comments on commit 694fa3c

Please sign in to comment.