Formatting
This commit is contained in:
@@ -47,11 +47,11 @@ class CDDALister : public DeviceLister {
|
||||
quint64 DeviceCapacity(const QString &id) override;
|
||||
quint64 DeviceFreeSpace(const QString &id) override;
|
||||
QVariantMap DeviceHardwareInfo(const QString &id) override;
|
||||
bool AskForScan(const QString&) const override { return false; }
|
||||
QString MakeFriendlyName(const QString&) override;
|
||||
QList<QUrl> MakeDeviceUrls(const QString&) override;
|
||||
void UnmountDevice(const QString&) override;
|
||||
void UpdateDeviceFreeSpace(const QString&) override;
|
||||
bool AskForScan(const QString &id) const override { return false; }
|
||||
QString MakeFriendlyName(const QString &id) override;
|
||||
QList<QUrl> MakeDeviceUrls(const QString &id) override;
|
||||
void UnmountDevice(const QString &id) override;
|
||||
void UpdateDeviceFreeSpace(const QString &id) override;
|
||||
bool Init() override;
|
||||
bool CopyMusic() override { return false; }
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ class DeviceDatabaseBackend : public QObject {
|
||||
private:
|
||||
SharedPtr<Database> db_;
|
||||
QThread *original_thread_;
|
||||
|
||||
};
|
||||
|
||||
#endif // DEVICEDATABASEBACKEND_H
|
||||
|
||||
@@ -229,8 +229,8 @@ QUrl DeviceLister::MakeUrlFromLocalPath(const QString &path) const {
|
||||
|
||||
bool DeviceLister::IsIpod(const QString &path) {
|
||||
return QFile::exists(path + "/iTunes_Control"_L1) ||
|
||||
QFile::exists(path + "/iPod_Control"_L1) ||
|
||||
QFile::exists(path + "/iTunes/iTunes_Control"_L1);
|
||||
QFile::exists(path + "/iPod_Control"_L1) ||
|
||||
QFile::exists(path + "/iTunes/iTunes_Control"_L1);
|
||||
}
|
||||
|
||||
QVariantList DeviceLister::GuessIconForPath(const QString &path) {
|
||||
|
||||
@@ -61,7 +61,6 @@ class DeviceItemDelegate : public CollectionItemDelegate {
|
||||
static const int kIconPadding;
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &idx) const override;
|
||||
|
||||
};
|
||||
|
||||
class DeviceView : public AutoExpandingTreeView {
|
||||
@@ -80,7 +79,7 @@ class DeviceView : public AutoExpandingTreeView {
|
||||
bool CanRecursivelyExpand(const QModelIndex &idx) const override;
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent*) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#ifndef FILESYSTEMDEVICE_H
|
||||
#define FILESYSTEMDEVICE_H
|
||||
|
||||
#ifdef _MSC_VER // FIXME
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#ifdef _MSC_VER // FIXME
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
@@ -84,7 +84,7 @@ class FilesystemDevice : public ConnectedDevice, public virtual FilesystemMusicS
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // FILESYSTEMDEVICE_H
|
||||
|
||||
@@ -160,7 +160,10 @@ QVariantList GioLister::DeviceIcons(const QString &id) {
|
||||
|
||||
}
|
||||
|
||||
QString GioLister::DeviceManufacturer(const QString &id) { Q_UNUSED(id); return QString(); }
|
||||
QString GioLister::DeviceManufacturer(const QString &id) {
|
||||
Q_UNUSED(id);
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString GioLister::DeviceModel(const QString &id) {
|
||||
|
||||
@@ -484,21 +487,21 @@ void GioLister::DeviceInfo::ReadMountInfo(GMount *mount) {
|
||||
}
|
||||
|
||||
#ifdef HAVE_GIO_UNIX
|
||||
#ifdef GLIB_VERSION_2_84
|
||||
# ifdef GLIB_VERSION_2_84
|
||||
GUnixMountEntry *unix_mount = g_unix_mount_entry_for(g_file_get_path(root), nullptr);
|
||||
#else
|
||||
# else
|
||||
GUnixMountEntry *unix_mount = g_unix_mount_for(g_file_get_path(root), nullptr);
|
||||
#endif
|
||||
# endif
|
||||
if (unix_mount) {
|
||||
// The GIO's definition of system internal mounts include filesystems like autofs, tmpfs, sysfs, etc,
|
||||
// and various system directories, including the root, /boot, /var, /home, etc.
|
||||
#ifdef GLIB_VERSION_2_84
|
||||
# ifdef GLIB_VERSION_2_84
|
||||
is_system_internal = g_unix_mount_entry_is_system_internal(unix_mount);
|
||||
g_unix_mount_entry_free(unix_mount);
|
||||
#else
|
||||
# else
|
||||
is_system_internal = g_unix_mount_is_system_internal(unix_mount);
|
||||
g_unix_mount_free(unix_mount);
|
||||
#endif
|
||||
# endif
|
||||
// Although checking most of the internal mounts is safe, we really don't want to touch autofs filesystems, as that would trigger automounting.
|
||||
if (is_system_internal) return;
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ class GioLister : public DeviceLister {
|
||||
static void VolumeAddedCallback(GVolumeMonitor *volume_monitor, GVolume *volume, gpointer instance);
|
||||
static void VolumeRemovedCallback(GVolumeMonitor *volume_monitor, GVolume *volume, gpointer instance);
|
||||
|
||||
static void MountAddedCallback(GVolumeMonitor *volume_monitor, GMount*, gpointer instance);
|
||||
static void MountChangedCallback(GVolumeMonitor *volume_monitor, GMount*, gpointer instance);
|
||||
static void MountAddedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance);
|
||||
static void MountChangedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance);
|
||||
static void MountRemovedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance);
|
||||
|
||||
static void VolumeMountFinished(GObject *object, GAsyncResult *result, gpointer instance);
|
||||
|
||||
@@ -151,13 +151,13 @@ bool MtpConnection::GetSupportedFiletypes(QList<Song::FileType> *ret) {
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
switch (static_cast<LIBMTP_filetype_t>(list[i])) {
|
||||
case LIBMTP_FILETYPE_WAV: *ret << Song::FileType::WAV; break;
|
||||
case LIBMTP_FILETYPE_WAV: *ret << Song::FileType::WAV; break;
|
||||
case LIBMTP_FILETYPE_MP2:
|
||||
case LIBMTP_FILETYPE_MP3: *ret << Song::FileType::MPEG; break;
|
||||
case LIBMTP_FILETYPE_WMA: *ret << Song::FileType::ASF; break;
|
||||
case LIBMTP_FILETYPE_MP3: *ret << Song::FileType::MPEG; break;
|
||||
case LIBMTP_FILETYPE_WMA: *ret << Song::FileType::ASF; break;
|
||||
case LIBMTP_FILETYPE_MP4:
|
||||
case LIBMTP_FILETYPE_M4A:
|
||||
case LIBMTP_FILETYPE_AAC: *ret << Song::FileType::MP4; break;
|
||||
case LIBMTP_FILETYPE_AAC: *ret << Song::FileType::MP4; break;
|
||||
case LIBMTP_FILETYPE_FLAC:
|
||||
*ret << Song::FileType::FLAC;
|
||||
*ret << Song::FileType::OggFlac;
|
||||
|
||||
@@ -285,13 +285,13 @@ bool MtpDevice::GetSupportedFiletypes(QList<Song::FileType> *ret, LIBMTP_mtpdevi
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
switch (static_cast<LIBMTP_filetype_t>(list[i])) {
|
||||
case LIBMTP_FILETYPE_WAV: *ret << Song::FileType::WAV; break;
|
||||
case LIBMTP_FILETYPE_WAV: *ret << Song::FileType::WAV; break;
|
||||
case LIBMTP_FILETYPE_MP2:
|
||||
case LIBMTP_FILETYPE_MP3: *ret << Song::FileType::MPEG; break;
|
||||
case LIBMTP_FILETYPE_WMA: *ret << Song::FileType::ASF; break;
|
||||
case LIBMTP_FILETYPE_MP3: *ret << Song::FileType::MPEG; break;
|
||||
case LIBMTP_FILETYPE_WMA: *ret << Song::FileType::ASF; break;
|
||||
case LIBMTP_FILETYPE_MP4:
|
||||
case LIBMTP_FILETYPE_M4A:
|
||||
case LIBMTP_FILETYPE_AAC: *ret << Song::FileType::MP4; break;
|
||||
case LIBMTP_FILETYPE_AAC: *ret << Song::FileType::MP4; break;
|
||||
case LIBMTP_FILETYPE_FLAC:
|
||||
*ret << Song::FileType::FLAC;
|
||||
*ret << Song::FileType::OggFlac;
|
||||
|
||||
@@ -64,7 +64,6 @@ class MtpLoader : public QObject {
|
||||
ScopedPtr<MtpConnection> connection_;
|
||||
QThread *original_thread_;
|
||||
bool abort_;
|
||||
|
||||
};
|
||||
|
||||
#endif // MTPLOADER_H
|
||||
|
||||
Reference in New Issue
Block a user