mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-04 13:17:32 +01:00
Fix formatting
This commit is contained in:
parent
8c198a99a5
commit
1d5783b846
7
3rdparty/qocoa/qocoa_mac.h
vendored
7
3rdparty/qocoa/qocoa_mac.h
vendored
@ -22,10 +22,10 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#include <AppKit/NSImage.h>
|
#include <AppKit/NSImage.h>
|
||||||
#include <Foundation/NSString.h>
|
#include <Foundation/NSString.h>
|
||||||
|
#include <QMacCocoaViewContainer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QtMacExtras>
|
#include <QtMacExtras>
|
||||||
#include <QMacCocoaViewContainer>
|
|
||||||
|
|
||||||
static inline NSString* fromQString(const QString &string)
|
static inline NSString* fromQString(const QString &string)
|
||||||
{
|
{
|
||||||
@ -47,10 +47,9 @@ static inline NSImage* fromQPixmap(const QPixmap &pixmap)
|
|||||||
return [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize];
|
return [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setupLayout(NSView *cocoaView, QWidget *parent)
|
static inline void setupLayout(NSView* cocoaView, QWidget* parent) {
|
||||||
{
|
|
||||||
parent->setAttribute(Qt::WA_NativeWindow);
|
parent->setAttribute(Qt::WA_NativeWindow);
|
||||||
QVBoxLayout *layout = new QVBoxLayout(parent);
|
QVBoxLayout* layout = new QVBoxLayout(parent);
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
layout->addWidget(new QMacCocoaViewContainer(cocoaView, parent));
|
layout->addWidget(new QMacCocoaViewContainer(cocoaView, parent));
|
||||||
}
|
}
|
||||||
|
3
3rdparty/qtsingleapplication/qtlocalpeer.cpp
vendored
3
3rdparty/qtsingleapplication/qtlocalpeer.cpp
vendored
@ -111,8 +111,7 @@ bool QtLocalPeer::isClient()
|
|||||||
if (lockFile.isLocked())
|
if (lockFile.isLocked())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!lockFile.lock(QtLockedFile::WriteLock, false))
|
if (!lockFile.lock(QtLockedFile::WriteLock, false)) return true;
|
||||||
return true;
|
|
||||||
|
|
||||||
bool res = server->listen(socketName);
|
bool res = server->listen(socketName);
|
||||||
#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0))
|
#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0))
|
||||||
|
2
3rdparty/qtsingleapplication/qtlocalpeer.h
vendored
2
3rdparty/qtsingleapplication/qtlocalpeer.h
vendored
@ -69,7 +69,7 @@ protected:
|
|||||||
QLocalServer* server;
|
QLocalServer* server;
|
||||||
QtLockedFile lockFile;
|
QtLockedFile lockFile;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const char* ack;
|
static const char* ack;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,8 +59,11 @@ Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate)
|
|||||||
Qt::HANDLE mutex;
|
Qt::HANDLE mutex;
|
||||||
if (doCreate) {
|
if (doCreate) {
|
||||||
#if (QT_VERSION < 0x050000)
|
#if (QT_VERSION < 0x050000)
|
||||||
QT_WA( { mutex = CreateMutexW(nullptr, FALSE, (WCHAR*)mname.utf16()); },
|
QT_WA({ mutex = CreateMutexW(nullptr, FALSE, (WCHAR*)mname.utf16()); },
|
||||||
{ mutex = CreateMutexA(nullptr, FALSE, mname.toLocal8Bit().constData()); } );
|
{
|
||||||
|
mutex =
|
||||||
|
CreateMutexA(nullptr, FALSE, mname.toLocal8Bit().constData());
|
||||||
|
});
|
||||||
#else
|
#else
|
||||||
mutex = CreateMutexW(nullptr, FALSE, (WCHAR*)mname.utf16());
|
mutex = CreateMutexW(nullptr, FALSE, (WCHAR*)mname.utf16());
|
||||||
#endif
|
#endif
|
||||||
@ -71,10 +74,18 @@ Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if (QT_VERSION < 0x050000)
|
#if (QT_VERSION < 0x050000)
|
||||||
QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (WCHAR*)mname.utf16()); },
|
QT_WA(
|
||||||
{ mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } );
|
{
|
||||||
|
mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE,
|
||||||
|
(WCHAR*)mname.utf16());
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE,
|
||||||
|
mname.toLocal8Bit().constData());
|
||||||
|
});
|
||||||
#else
|
#else
|
||||||
mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (WCHAR*)mname.utf16());
|
mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE,
|
||||||
|
(WCHAR*)mname.utf16());
|
||||||
#endif
|
#endif
|
||||||
if (!mutex) {
|
if (!mutex) {
|
||||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gnomeglobalshortcutbackend.h"
|
|
||||||
#include "globalshortcuts.h"
|
|
||||||
#include "core/closure.h"
|
#include "core/closure.h"
|
||||||
#include "core/logging.h"
|
#include "core/logging.h"
|
||||||
|
#include "globalshortcuts.h"
|
||||||
|
#include "gnomeglobalshortcutbackend.h"
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
#include <dbus/gnomesettingsdaemon.h>
|
#include <dbus/gnomesettingsdaemon.h>
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include "core/utilities.h"
|
#include "core/utilities.h"
|
||||||
#include "internet/core/internetmodel.h"
|
#include "internet/core/internetmodel.h"
|
||||||
#ifdef HAVE_SPOTIFY
|
#ifdef HAVE_SPOTIFY
|
||||||
# include "internet/spotify/spotifyservice.h"
|
#include "internet/spotify/spotifyservice.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AlbumCoverLoader::AlbumCoverLoader(QObject* parent)
|
AlbumCoverLoader::AlbumCoverLoader(QObject* parent)
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
#ifndef COVERS_ALBUMCOVERLOADER_H_
|
#ifndef COVERS_ALBUMCOVERLOADER_H_
|
||||||
#define COVERS_ALBUMCOVERLOADER_H_
|
#define COVERS_ALBUMCOVERLOADER_H_
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "albumcoverloaderoptions.h"
|
#include "albumcoverloaderoptions.h"
|
||||||
|
#include "config.h"
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
|
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user