mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-28 07:54:49 +03:00
OS X: Fix a few warnings
This commit is contained in:
parent
a4f519eaeb
commit
c98bcc8e9e
4 changed files with 8 additions and 1 deletions
|
@ -553,6 +553,7 @@ void Folder::slotWatchedPathChanged(const QString& path)
|
||||||
// the sync is doing to filter out our own changes.
|
// the sync is doing to filter out our own changes.
|
||||||
bool ownChange = false;
|
bool ownChange = false;
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
|
Q_UNUSED(path)
|
||||||
// On OSX the folder watcher does not report changes done by our
|
// On OSX the folder watcher does not report changes done by our
|
||||||
// own process. Therefore nothing needs to be done here!
|
// own process. Therefore nothing needs to be done here!
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -47,11 +47,15 @@ static void callback(
|
||||||
const FSEventStreamEventFlags eventFlags[],
|
const FSEventStreamEventFlags eventFlags[],
|
||||||
const FSEventStreamEventId eventIds[])
|
const FSEventStreamEventId eventIds[])
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(streamRef)
|
||||||
|
Q_UNUSED(eventFlags)
|
||||||
|
Q_UNUSED(eventIds)
|
||||||
|
|
||||||
qDebug() << "FolderWatcherPrivate::callback by OS X";
|
qDebug() << "FolderWatcherPrivate::callback by OS X";
|
||||||
|
|
||||||
QStringList paths;
|
QStringList paths;
|
||||||
CFArrayRef eventPaths = (CFArrayRef)eventPathsVoid;
|
CFArrayRef eventPaths = (CFArrayRef)eventPathsVoid;
|
||||||
for (int i = 0; i < numEvents; ++i) {
|
for (int i = 0; i < static_cast<int>(numEvents); ++i) {
|
||||||
CFStringRef path = reinterpret_cast<CFStringRef>(CFArrayGetValueAtIndex(eventPaths, i));
|
CFStringRef path = reinterpret_cast<CFStringRef>(CFArrayGetValueAtIndex(eventPaths, i));
|
||||||
|
|
||||||
QString qstring;
|
QString qstring;
|
||||||
|
|
|
@ -183,6 +183,7 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
|
||||||
qint64 Utility::freeDiskSpace(const QString &path, bool *ok)
|
qint64 Utility::freeDiskSpace(const QString &path, bool *ok)
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD)
|
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD)
|
||||||
|
Q_UNUSED(ok)
|
||||||
struct statvfs stat;
|
struct statvfs stat;
|
||||||
statvfs(path.toUtf8().data(), &stat);
|
statvfs(path.toUtf8().data(), &stat);
|
||||||
return (qint64) stat.f_bavail * stat.f_frsize;
|
return (qint64) stat.f_bavail * stat.f_frsize;
|
||||||
|
|
|
@ -69,6 +69,7 @@ bool hasLaunchOnStartup_private(const QString &)
|
||||||
|
|
||||||
void setLaunchOnStartup_private(const QString &appName, const QString& guiName, bool enable)
|
void setLaunchOnStartup_private(const QString &appName, const QString& guiName, bool enable)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(appName)
|
||||||
Q_UNUSED(guiName)
|
Q_UNUSED(guiName)
|
||||||
QString filePath = QDir(QCoreApplication::applicationDirPath()+QLatin1String("/../..")).absolutePath();
|
QString filePath = QDir(QCoreApplication::applicationDirPath()+QLatin1String("/../..")).absolutePath();
|
||||||
CFStringRef folderCFStr = CFStringCreateWithCString(0, filePath.toUtf8().data(), kCFStringEncodingUTF8);
|
CFStringRef folderCFStr = CFStringCreateWithCString(0, filePath.toUtf8().data(), kCFStringEncodingUTF8);
|
||||||
|
|
Loading…
Reference in a new issue