Replace Q_OS_WIN with Q_OS_WIN32
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
#include "collectionitem.h"
|
||||
#include "collectionitemdelegate.h"
|
||||
#include "collectionview.h"
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
# include "device/devicemanager.h"
|
||||
# include "device/devicestatefiltermodel.h"
|
||||
#endif
|
||||
@@ -95,7 +95,7 @@ CollectionView::CollectionView(QWidget *parent)
|
||||
action_open_in_new_playlist_(nullptr),
|
||||
action_organize_(nullptr),
|
||||
action_search_for_this_(nullptr),
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_(nullptr),
|
||||
#endif
|
||||
action_edit_track_(nullptr),
|
||||
@@ -417,7 +417,7 @@ void CollectionView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
context_menu_->addSeparator();
|
||||
action_organize_ = context_menu_->addAction(IconLoader::Load(u"edit-copy"_s), tr("Organize files..."), this, &CollectionView::Organize);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_ = context_menu_->addAction(IconLoader::Load(u"device"_s), tr("Copy to device..."), this, &CollectionView::CopyToDevice);
|
||||
#endif
|
||||
action_delete_files_ = context_menu_->addAction(IconLoader::Load(u"edit-delete"_s), tr("Delete from disk..."), this, &CollectionView::Delete);
|
||||
@@ -439,7 +439,7 @@ void CollectionView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
context_menu_->addMenu(filter_widget_->menu());
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_->setDisabled(device_manager_->connected_devices_model()->rowCount() == 0);
|
||||
QObject::connect(device_manager_->connected_devices_model(), &DeviceStateFilterModel::IsEmptyChanged, action_copy_to_device_, &QAction::setDisabled);
|
||||
#endif
|
||||
@@ -481,7 +481,7 @@ void CollectionView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
action_rescan_songs_->setEnabled(regular_editable > 0);
|
||||
|
||||
action_organize_->setVisible(regular_elements == regular_editable);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_->setVisible(regular_elements == regular_editable);
|
||||
#endif
|
||||
|
||||
@@ -492,7 +492,7 @@ void CollectionView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
// only when all selected items are editable
|
||||
action_organize_->setEnabled(regular_elements == regular_editable);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_->setEnabled(regular_elements == regular_editable);
|
||||
#endif
|
||||
|
||||
@@ -759,7 +759,7 @@ void CollectionView::RescanSongs() {
|
||||
|
||||
void CollectionView::CopyToDevice() {
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
if (!organize_dialog_) {
|
||||
organize_dialog_ = make_unique<OrganizeDialog>(task_manager_, tagreader_client_, nullptr, this);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
QAction *action_organize_;
|
||||
QAction *action_search_for_this_;
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
QAction *action_copy_to_device_;
|
||||
#endif
|
||||
QAction *action_edit_track_;
|
||||
|
||||
@@ -43,7 +43,7 @@ bool IconLoader::custom_icons_ = false;
|
||||
|
||||
void IconLoader::Init() {
|
||||
|
||||
#if !defined(Q_OS_MACOS) && !defined(Q_OS_WIN)
|
||||
#if !defined(Q_OS_MACOS) && !defined(Q_OS_WIN32)
|
||||
Settings s;
|
||||
s.beginGroup(AppearanceSettings::kSettingsGroup);
|
||||
system_icons_ = s.value("system_icons", false).toBool();
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
#include "lyrics/lyricsproviders.h"
|
||||
#include "device/devicemanager.h"
|
||||
#include "device/devicestatefiltermodel.h"
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
# include "device/deviceview.h"
|
||||
# include "device/deviceviewcontainer.h"
|
||||
#endif
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
#include "organize/organizeerrordialog.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
# include "core/windows7thumbbar.h"
|
||||
#endif
|
||||
|
||||
@@ -278,7 +278,7 @@ constexpr char QTSPARKLE_URL[] = "https://www.strawberrymusicplayer.org/sparkle-
|
||||
MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OSDBase *osd, const CommandlineOptions &options, QWidget *parent)
|
||||
: QMainWindow(parent),
|
||||
ui_(new Ui_MainWindow),
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
thumbbar_(new Windows7ThumbBar(this)),
|
||||
#endif
|
||||
app_(app),
|
||||
@@ -297,7 +297,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
context_view_(new ContextView(this)),
|
||||
collection_view_(new CollectionViewContainer(this)),
|
||||
file_view_(new FileView(this)),
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
device_view_(new DeviceViewContainer(this)),
|
||||
#endif
|
||||
playlist_list_(new PlaylistListContainer(this)),
|
||||
@@ -362,7 +362,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
playlist_move_to_collection_(nullptr),
|
||||
playlist_open_in_browser_(nullptr),
|
||||
playlist_organize_(nullptr),
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
playlist_copy_to_device_(nullptr),
|
||||
#endif
|
||||
playlist_delete_(nullptr),
|
||||
@@ -416,7 +416,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
ui_->tabs->AddTab(smartplaylists_view_, u"smartplaylists"_s, IconLoader::Load(u"view-media-playlist"_s, true, 0, 32), tr("Smart playlists"));
|
||||
ui_->tabs->AddTab(file_view_, u"files"_s, IconLoader::Load(u"document-open"_s, true, 0, 32), tr("Files"));
|
||||
ui_->tabs->AddTab(radio_view_, u"radios"_s, IconLoader::Load(u"radio"_s, true, 0, 32), tr("Radios"));
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
ui_->tabs->AddTab(device_view_, u"devices"_s, IconLoader::Load(u"device"_s, true, 0, 32), tr("Devices"));
|
||||
#endif
|
||||
#ifdef HAVE_SUBSONIC
|
||||
@@ -466,7 +466,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
|
||||
collection_view_->view()->setModel(app_->collection()->model()->filter());
|
||||
collection_view_->view()->Init(app->task_manager(), app->tagreader_client(), app->network(), app->albumcover_loader(), app->current_albumcover_loader(), app->cover_providers(), app->lyrics_providers(), app->collection(), app->device_manager(), app->streaming_services());
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
device_view_->view()->Init(app->task_manager(), app->tagreader_client(), app->device_manager(), app->collection_model()->directory_model());
|
||||
#endif
|
||||
playlist_list_->Init(app_->task_manager(), app->tagreader_client(), app_->playlist_manager(), app_->playlist_backend(), app_->device_manager());
|
||||
@@ -540,7 +540,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
QObject::connect(file_view_, &FileView::CopyToCollection, this, &MainWindow::CopyFilesToCollection);
|
||||
QObject::connect(file_view_, &FileView::MoveToCollection, this, &MainWindow::MoveFilesToCollection);
|
||||
QObject::connect(file_view_, &FileView::EditTags, this, &MainWindow::EditFileTags);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
QObject::connect(file_view_, &FileView::CopyToDevice, this, &MainWindow::CopyFilesToDevice);
|
||||
#endif
|
||||
file_view_->SetTaskManager(app_->task_manager());
|
||||
@@ -704,7 +704,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
QObject::connect(album_cover_choice_controller_->search_cover_auto_action(), &QAction::triggered, this, &MainWindow::SearchCoverAutomatically);
|
||||
QObject::connect(album_cover_choice_controller_->search_cover_auto_action(), &QAction::toggled, this, &MainWindow::ToggleSearchCoverAuto);
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
// Devices connections
|
||||
QObject::connect(device_view_->view(), &DeviceView::AddToPlaylistSignal, this, &MainWindow::AddToPlaylist);
|
||||
#endif
|
||||
@@ -810,7 +810,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
playlist_organize_ = playlist_menu_->addAction(IconLoader::Load(u"edit-copy"_s), tr("Organize files..."), this, &MainWindow::PlaylistMoveToCollection);
|
||||
playlist_copy_to_collection_ = playlist_menu_->addAction(IconLoader::Load(u"edit-copy"_s), tr("Copy to collection..."), this, &MainWindow::PlaylistCopyToCollection);
|
||||
playlist_move_to_collection_ = playlist_menu_->addAction(IconLoader::Load(u"go-jump"_s), tr("Move to collection..."), this, &MainWindow::PlaylistMoveToCollection);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
playlist_copy_to_device_ = playlist_menu_->addAction(IconLoader::Load(u"device"_s), tr("Copy to device..."), this, &MainWindow::PlaylistCopyToDevice);
|
||||
#endif
|
||||
playlist_delete_ = playlist_menu_->addAction(IconLoader::Load(u"edit-delete"_s), tr("Delete from disk..."), this, &MainWindow::PlaylistDelete);
|
||||
@@ -854,7 +854,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
QObject::connect(&*tray_icon_, &SystemTrayIcon::ChangeVolume, this, &MainWindow::VolumeWheelEvent);
|
||||
|
||||
// Windows 7 thumbbar buttons
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
thumbbar_->SetActions(QList<QAction*>() << ui_->action_previous_track << ui_->action_play_pause << ui_->action_stop << ui_->action_next_track << nullptr << ui_->action_love);
|
||||
#endif
|
||||
|
||||
@@ -966,7 +966,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||
QObject::connect(&*app_->lastfm_import(), &LastFMImport::UpdateLastPlayed, &*app_->collection_backend(), &CollectionBackend::UpdateLastPlayed);
|
||||
QObject::connect(&*app_->lastfm_import(), &LastFMImport::UpdatePlayCount, &*app_->collection_backend(), &CollectionBackend::UpdatePlayCount);
|
||||
|
||||
#if !defined(HAVE_AUDIOCD) || defined(Q_OS_WIN)
|
||||
#if !defined(HAVE_AUDIOCD) || defined(Q_OS_WIN32)
|
||||
ui_->action_open_cd->setEnabled(false);
|
||||
ui_->action_open_cd->setVisible(false);
|
||||
#endif
|
||||
@@ -2002,7 +2002,7 @@ void MainWindow::PlaylistRightClick(const QPoint global_pos, const QModelIndex &
|
||||
playlist_show_in_collection_->setVisible(false);
|
||||
playlist_copy_to_collection_->setVisible(false);
|
||||
playlist_move_to_collection_->setVisible(false);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
playlist_copy_to_device_->setVisible(false);
|
||||
#endif
|
||||
playlist_organize_->setVisible(false);
|
||||
@@ -2077,7 +2077,7 @@ void MainWindow::PlaylistRightClick(const QPoint global_pos, const QModelIndex &
|
||||
playlist_move_to_collection_->setVisible(local_songs > 0);
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
playlist_copy_to_device_->setVisible(local_songs > 0);
|
||||
#endif
|
||||
|
||||
@@ -2716,7 +2716,7 @@ void MainWindow::MoveFilesToCollection(const QList<QUrl> &urls) {
|
||||
|
||||
void MainWindow::CopyFilesToDevice(const QList<QUrl> &urls) {
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
organize_dialog_->SetDestinationModel(app_->device_manager()->connected_devices_model(), true);
|
||||
organize_dialog_->SetCopy(true);
|
||||
if (organize_dialog_->SetUrls(urls)) {
|
||||
@@ -2856,7 +2856,7 @@ void MainWindow::PlaylistSkip() {
|
||||
|
||||
void MainWindow::PlaylistCopyToDevice() {
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
|
||||
SongList songs;
|
||||
|
||||
@@ -3032,7 +3032,7 @@ void MainWindow::Raise() {
|
||||
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, qintptr *result) {
|
||||
|
||||
if (exit_count_ == 0 && message) {
|
||||
@@ -3041,7 +3041,7 @@ bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, qintptr
|
||||
}
|
||||
return QMainWindow::nativeEvent(eventType, message, result);
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
#endif // Q_OS_WIN32
|
||||
|
||||
void MainWindow::AutoCompleteTags() {
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class CollectionViewContainer;
|
||||
class CollectionFilter;
|
||||
class AlbumCoverChoiceController;
|
||||
class CommandlineOptions;
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
class DeviceViewContainer;
|
||||
#endif
|
||||
class EditTagDialog;
|
||||
@@ -92,7 +92,7 @@ class Ui_MainWindow;
|
||||
class StreamingSongsView;
|
||||
class StreamingTabsView;
|
||||
class SmartPlaylistsViewContainer;
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
class Windows7ThumbBar;
|
||||
#endif
|
||||
class AddStreamDialog;
|
||||
@@ -114,7 +114,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||
void hideEvent(QHideEvent *e) override;
|
||||
void closeEvent(QCloseEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result) override;
|
||||
#endif
|
||||
|
||||
@@ -289,7 +289,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||
|
||||
private:
|
||||
Ui_MainWindow *ui_;
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
Windows7ThumbBar *thumbbar_;
|
||||
#endif
|
||||
|
||||
@@ -306,7 +306,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||
ContextView *context_view_;
|
||||
CollectionViewContainer *collection_view_;
|
||||
FileView *file_view_;
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
DeviceViewContainer *device_view_;
|
||||
#endif
|
||||
PlaylistListContainer *playlist_list_;
|
||||
@@ -359,7 +359,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||
QAction *playlist_move_to_collection_;
|
||||
QAction *playlist_open_in_browser_;
|
||||
QAction *playlist_organize_;
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
QAction *playlist_copy_to_device_;
|
||||
#endif
|
||||
QAction *playlist_delete_;
|
||||
|
||||
@@ -1567,7 +1567,7 @@ void GstEnginePipeline::ErrorMessageReceived(GstMessage *msg) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
// Ignore non-error received for directsoundsink: "IDirectSoundBuffer_GetStatus The operation completed successfully"
|
||||
if (code == GST_RESOURCE_ERROR_OPEN_WRITE && message.contains(QLatin1String("IDirectSoundBuffer_GetStatus The operation completed successfully."))) {
|
||||
return;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
# include "globalshortcutsbackend-x11.h"
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
# include "globalshortcutsbackend-win.h"
|
||||
#endif
|
||||
|
||||
@@ -92,7 +92,7 @@ GlobalShortcutsManager::GlobalShortcutsManager(QWidget *parent) : QWidget(parent
|
||||
backends_ << new GlobalShortcutsBackendMacOS(this, this);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
backends_ << new GlobalShortcutsBackendWin(this, this);
|
||||
#endif
|
||||
|
||||
@@ -112,7 +112,7 @@ void GlobalShortcutsManager::ReloadSettings() {
|
||||
backends_enabled_ << GlobalShortcutsBackend::Type::macOS;
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
backends_enabled_ << GlobalShortcutsBackend::Type::Win;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -61,11 +61,11 @@
|
||||
#include "osdpretty.h"
|
||||
#include "ui_osdpretty.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
# include "utilities/winutils.h"
|
||||
#endif
|
||||
|
||||
@@ -103,7 +103,7 @@ OSDPretty::OSDPretty(const Mode mode, QWidget *parent)
|
||||
|
||||
ui_->setupUi(this);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
// Don't show the window in the taskbar. Qt::ToolTip does this too, but it adds an extra ugly shadow.
|
||||
int ex_style = GetWindowLong(reinterpret_cast<HWND>(winId()), GWL_EXSTYLE);
|
||||
ex_style |= WS_EX_NOACTIVATE;
|
||||
@@ -238,7 +238,7 @@ void OSDPretty::Load() {
|
||||
background_opacity_ = s.value(OSDPrettySettings::kBackgroundOpacity, 0.85).toFloat();
|
||||
font_.fromString(s.value(OSDPrettySettings::kFont, u"Verdana,9,-1,5,50,0,0,0,0,0"_s).toString());
|
||||
disable_duration_ = s.value(OSDPrettySettings::kDisableDuration, false).toBool();
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
fading_enabled_ = s.value(OSDPrettySettings::kFading, true).toBool();
|
||||
#else
|
||||
fading_enabled_ = s.value(OSDPrettySettings::kFading, false).toBool();
|
||||
@@ -432,7 +432,7 @@ void OSDPretty::Reposition() {
|
||||
int x = popup_pos_.x() < 0 ? geometry.right() - width() : geometry.left() + popup_pos_.x();
|
||||
int y = popup_pos_.y() < 0 ? geometry.bottom() - height() : geometry.top() + popup_pos_.y();
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
x = qBound(0, x, geometry.right() - width());
|
||||
y = qBound(0, y, geometry.bottom() - height());
|
||||
#endif
|
||||
@@ -456,7 +456,7 @@ void OSDPretty::Reposition() {
|
||||
}
|
||||
|
||||
// On windows, enable blurbehind on the masked area
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
Utilities::enableBlurBehindWindow(windowHandle(), QRegion(mask));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "ui_playlistlistcontainer.h"
|
||||
#include "organize/organizedialog.h"
|
||||
#include "constants/appearancesettings.h"
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
# include "device/devicemanager.h"
|
||||
# include "device/devicestatefiltermodel.h"
|
||||
#endif
|
||||
@@ -73,7 +73,7 @@ PlaylistListContainer::PlaylistListContainer(QWidget *parent)
|
||||
action_new_folder_(new QAction(this)),
|
||||
action_remove_(new QAction(this)),
|
||||
action_save_playlist_(new QAction(this)),
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_(new QAction(this)),
|
||||
#endif
|
||||
model_(new PlaylistListModel(this)),
|
||||
@@ -87,7 +87,7 @@ PlaylistListContainer::PlaylistListContainer(QWidget *parent)
|
||||
action_new_folder_->setText(tr("New folder"));
|
||||
action_remove_->setText(tr("Delete"));
|
||||
action_save_playlist_->setText(tr("Save playlist", "Save playlist menu action."));
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_->setText(tr("Copy to device..."));
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ PlaylistListContainer::PlaylistListContainer(QWidget *parent)
|
||||
QObject::connect(action_new_folder_, &QAction::triggered, this, &PlaylistListContainer::NewFolderClicked);
|
||||
QObject::connect(action_remove_, &QAction::triggered, this, &PlaylistListContainer::Delete);
|
||||
QObject::connect(action_save_playlist_, &QAction::triggered, this, &PlaylistListContainer::SavePlaylist);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
QObject::connect(action_copy_to_device_, &QAction::triggered, this, &PlaylistListContainer::CopyToDevice);
|
||||
#endif
|
||||
QObject::connect(model_, &PlaylistListModel::PlaylistPathChanged, this, &PlaylistListContainer::PlaylistPathChanged);
|
||||
@@ -172,7 +172,7 @@ void PlaylistListContainer::showEvent(QShowEvent *e) {
|
||||
action_new_folder_->setIcon(IconLoader::Load(u"folder-new"_s));
|
||||
action_remove_->setIcon(IconLoader::Load(u"edit-delete"_s));
|
||||
action_save_playlist_->setIcon(IconLoader::Load(u"document-save"_s));
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_->setIcon(IconLoader::Load(u"device"_s));
|
||||
#endif
|
||||
|
||||
@@ -370,7 +370,7 @@ void PlaylistListContainer::ItemMimeDataDropped(const QModelIndex &proxy_idx, co
|
||||
|
||||
void PlaylistListContainer::CopyToDevice() {
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
|
||||
const QModelIndex proxy_idx = ui_->tree->currentIndex();
|
||||
if (!proxy_idx.isValid()) return;
|
||||
@@ -481,7 +481,7 @@ void PlaylistListContainer::contextMenuEvent(QContextMenuEvent *e) {
|
||||
menu_->addAction(action_remove_);
|
||||
menu_->addSeparator();
|
||||
menu_->addAction(action_save_playlist_);
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
menu_->addSeparator();
|
||||
menu_->addAction(action_copy_to_device_);
|
||||
#endif
|
||||
@@ -489,7 +489,7 @@ void PlaylistListContainer::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
action_remove_->setVisible(ui_->tree->ItemsSelected());
|
||||
action_save_playlist_->setVisible(ui_->tree->ItemsSelected());
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
action_copy_to_device_->setVisible(ui_->tree->ItemsSelected());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class PlaylistListContainer : public QWidget {
|
||||
QAction *action_new_folder_;
|
||||
QAction *action_remove_;
|
||||
QAction *action_save_playlist_;
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
QAction *action_copy_to_device_;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ AppearanceSettingsPage::AppearanceSettingsPage(SettingsDialog *dialog, QWidget *
|
||||
QObject::connect(ui_->select_playlist_playing_song_color, &QPushButton::pressed, this, &AppearanceSettingsPage::PlaylistPlayingSongSelectColor);
|
||||
QObject::connect(ui_->playlist_playing_song_color_system, &QRadioButton::toggled, this, &AppearanceSettingsPage::PlaylistPlayingSongColorSystem);
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN32)
|
||||
ui_->checkbox_system_icons->hide();
|
||||
#endif
|
||||
|
||||
@@ -120,7 +120,7 @@ void AppearanceSettingsPage::Load() {
|
||||
|
||||
ComboBoxLoadFromSettings(s, ui_->combobox_style, QLatin1String(kStyle), u"default"_s);
|
||||
|
||||
#if !defined(Q_OS_MACOS) && !defined(Q_OS_WIN)
|
||||
#if !defined(Q_OS_MACOS) && !defined(Q_OS_WIN32)
|
||||
ui_->checkbox_system_icons->setChecked(s.value(kSystemThemeIcons, false).toBool());
|
||||
#endif
|
||||
|
||||
@@ -202,7 +202,7 @@ void AppearanceSettingsPage::Save() {
|
||||
|
||||
s.setValue("style", ui_->combobox_style->currentText());
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN32)
|
||||
s.setValue(kSystemThemeIcons, false);
|
||||
#else
|
||||
s.setValue(kSystemThemeIcons, ui_->checkbox_system_icons->isChecked());
|
||||
|
||||
@@ -275,7 +275,7 @@ void BackendSettingsPage::Load_Device(const QString &output, const QVariant &dev
|
||||
ui_->combobox_device->clear();
|
||||
ui_->lineedit_device->clear();
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN32
|
||||
ui_->combobox_device->addItem(IconLoader::Load(u"soundcard"_s), QLatin1String(kOutputAutomaticallySelect), QVariant());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
# include <sys/statvfs.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void RevealFileInFinder(const QString &path) {
|
||||
}
|
||||
#endif // Q_OS_MACOS
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
void ShowFileInExplorer(const QString &path);
|
||||
void ShowFileInExplorer(const QString &path) {
|
||||
QProcess::execute(u"explorer.exe"_s, QStringList() << u"/select,"_s << QDir::toNativeSeparators(path));
|
||||
|
||||
Reference in New Issue
Block a user