diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-01-03 07:41:04 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-01-03 07:41:04 +0000 |
| commit | b917024aa1ac4cb0a40164132db3c6d2913157eb (patch) | |
| tree | 4424bef9f2ac9a3dab21c822836a1b5c79ffee47 /src/plugins/General | |
| parent | bef5a901922c002815d047d276e61ec0bf8c0f46 (diff) | |
| download | qmmp-b917024aa1ac4cb0a40164132db3c6d2913157eb.tar.gz qmmp-b917024aa1ac4cb0a40164132db3c6d2913157eb.tar.bz2 qmmp-b917024aa1ac4cb0a40164132db3c6d2913157eb.zip | |
fixed build with -Werror=zero-as-null-pointer-constant
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8572 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
74 files changed, 103 insertions, 103 deletions
diff --git a/src/plugins/General/converter/converter.cpp b/src/plugins/General/converter/converter.cpp index d5e39c8a0..b4e693211 100644 --- a/src/plugins/General/converter/converter.cpp +++ b/src/plugins/General/converter/converter.cpp @@ -36,8 +36,8 @@ Converter::Converter(QObject *parent) : QObject(parent), QRunnable() { m_user_stop = false; - m_decoder = 0; - m_input = 0; + m_decoder = nullptr; + m_input = nullptr; m_row = -1; } @@ -47,12 +47,12 @@ Converter::~Converter() if(m_decoder) { delete m_decoder; - m_decoder = 0; + m_decoder = nullptr; } if(m_input) { delete m_input; - m_input = 0; + m_input = nullptr; } } @@ -78,7 +78,7 @@ bool Converter::prepare(const QString &url, int row, const QVariantMap &preset) } } - DecoderFactory *factory = 0; + DecoderFactory *factory = nullptr; if(!source->path().contains("://")) factory = Decoder::findByFilePath(source->path()); diff --git a/src/plugins/General/converter/converter.h b/src/plugins/General/converter/converter.h index 94571f11b..f35a4251c 100644 --- a/src/plugins/General/converter/converter.h +++ b/src/plugins/General/converter/converter.h @@ -38,7 +38,7 @@ class Converter : public QObject, public QRunnable { Q_OBJECT public: - explicit Converter(QObject *parent = 0); + explicit Converter(QObject *parent = nullptr); virtual ~Converter(); bool prepare(const QString &url, int row, const QVariantMap &preset); diff --git a/src/plugins/General/converter/converterdialog.h b/src/plugins/General/converter/converterdialog.h index edde11558..6bc6f066e 100644 --- a/src/plugins/General/converter/converterdialog.h +++ b/src/plugins/General/converter/converterdialog.h @@ -37,7 +37,7 @@ class ConverterDialog : public QDialog { Q_OBJECT public: - explicit ConverterDialog(QList <PlayListTrack *> items, QWidget *parent = 0); + explicit ConverterDialog(QList <PlayListTrack *> items, QWidget *parent = nullptr); virtual ~ConverterDialog(); public slots: diff --git a/src/plugins/General/converter/converterfactory.cpp b/src/plugins/General/converter/converterfactory.cpp index c48deae30..dc37f53e8 100644 --- a/src/plugins/General/converter/converterfactory.cpp +++ b/src/plugins/General/converter/converterfactory.cpp @@ -41,7 +41,7 @@ QObject *ConverterFactory::create(QObject *parent) QDialog *ConverterFactory::createConfigDialog(QWidget *parent) { Q_UNUSED(parent); - return 0; + return nullptr; } void ConverterFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/converter/converterhelper.h b/src/plugins/General/converter/converterhelper.h index a75ad6426..a9f3c5fcd 100644 --- a/src/plugins/General/converter/converterhelper.h +++ b/src/plugins/General/converter/converterhelper.h @@ -33,7 +33,7 @@ class ConverterHelper : public QObject { Q_OBJECT public: - ConverterHelper(QObject *parent = 0); + ConverterHelper(QObject *parent = nullptr); ~ConverterHelper(); diff --git a/src/plugins/General/converter/preseteditor.h b/src/plugins/General/converter/preseteditor.h index c9dabc8f7..98786747c 100644 --- a/src/plugins/General/converter/preseteditor.h +++ b/src/plugins/General/converter/preseteditor.h @@ -36,7 +36,7 @@ class PresetEditor : public QDialog Q_OBJECT public: - explicit PresetEditor(const QVariantMap &data, QWidget *parent = 0); + explicit PresetEditor(const QVariantMap &data, QWidget *parent = nullptr); virtual ~PresetEditor(); const QVariantMap data() const; diff --git a/src/plugins/General/copypaste/copypaste.h b/src/plugins/General/copypaste/copypaste.h index 3ac153da4..1935c8bd5 100644 --- a/src/plugins/General/copypaste/copypaste.h +++ b/src/plugins/General/copypaste/copypaste.h @@ -36,7 +36,7 @@ class CopyPaste : public QObject { Q_OBJECT public: - CopyPaste(QObject *parent = 0); + CopyPaste(QObject *parent = nullptr); ~CopyPaste(); diff --git a/src/plugins/General/copypaste/copypastefactory.cpp b/src/plugins/General/copypaste/copypastefactory.cpp index 5c15895de..3b5403db6 100644 --- a/src/plugins/General/copypaste/copypastefactory.cpp +++ b/src/plugins/General/copypaste/copypastefactory.cpp @@ -41,7 +41,7 @@ QObject *CopyPasteFactory::create(QObject *parent) QDialog *CopyPasteFactory::createConfigDialog(QWidget *) { - return 0; + return nullptr; } void CopyPasteFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/covermanager/covermanager.h b/src/plugins/General/covermanager/covermanager.h index 729d79a40..773eb1034 100644 --- a/src/plugins/General/covermanager/covermanager.h +++ b/src/plugins/General/covermanager/covermanager.h @@ -33,7 +33,7 @@ class CoverManager : public QObject { Q_OBJECT public: - CoverManager(QObject *parent = 0); + CoverManager(QObject *parent = nullptr); private slots: void showWindow(); diff --git a/src/plugins/General/covermanager/covermanagerfactory.cpp b/src/plugins/General/covermanager/covermanagerfactory.cpp index caae162f5..8ea7c8c6c 100644 --- a/src/plugins/General/covermanager/covermanagerfactory.cpp +++ b/src/plugins/General/covermanager/covermanagerfactory.cpp @@ -42,7 +42,7 @@ QObject *CoverManagerFactory::create(QObject *parent) QDialog *CoverManagerFactory::createConfigDialog(QWidget *) { - return 0; + return nullptr; } void CoverManagerFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/covermanager/coverwidget.h b/src/plugins/General/covermanager/coverwidget.h index d56404585..55ee9a2eb 100644 --- a/src/plugins/General/covermanager/coverwidget.h +++ b/src/plugins/General/covermanager/coverwidget.h @@ -34,7 +34,7 @@ class CoverWidget : public QWidget { Q_OBJECT public: - CoverWidget(QWidget *parent = 0); + CoverWidget(QWidget *parent = nullptr); ~CoverWidget(); diff --git a/src/plugins/General/fileops/fileops.h b/src/plugins/General/fileops/fileops.h index f5a542f3a..0ad1fa27e 100644 --- a/src/plugins/General/fileops/fileops.h +++ b/src/plugins/General/fileops/fileops.h @@ -37,7 +37,7 @@ class FileOps : public QObject { Q_OBJECT public: - FileOps(QObject *parent = 0); + FileOps(QObject *parent = nullptr); ~FileOps(); diff --git a/src/plugins/General/fileops/hotkeydialog.h b/src/plugins/General/fileops/hotkeydialog.h index ba63c7ce5..d68da11b6 100644 --- a/src/plugins/General/fileops/hotkeydialog.h +++ b/src/plugins/General/fileops/hotkeydialog.h @@ -33,7 +33,7 @@ class HotkeyDialog : public QDialog { Q_OBJECT public: - HotkeyDialog(const QString &key, QWidget *parent = 0); + HotkeyDialog(const QString &key, QWidget *parent = nullptr); ~HotkeyDialog(); diff --git a/src/plugins/General/fileops/settingsdialog.h b/src/plugins/General/fileops/settingsdialog.h index 15d657802..41f4e4575 100644 --- a/src/plugins/General/fileops/settingsdialog.h +++ b/src/plugins/General/fileops/settingsdialog.h @@ -32,7 +32,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp index e22d2d9e9..af50b9e3f 100644 --- a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp +++ b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp @@ -42,7 +42,7 @@ QObject *GnomeHotkeyFactory::create(QObject *parent) QDialog *GnomeHotkeyFactory::createConfigDialog(QWidget *parent) { Q_UNUSED(parent); - return 0; + return nullptr; } void GnomeHotkeyFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/gnomehotkey/mediakeys.cpp b/src/plugins/General/gnomehotkey/mediakeys.cpp index 495380173..e4ae96155 100644 --- a/src/plugins/General/gnomehotkey/mediakeys.cpp +++ b/src/plugins/General/gnomehotkey/mediakeys.cpp @@ -33,7 +33,7 @@ MediaKeys::MediaKeys(QObject *parent) : QObject(parent) { m_isRegistered = false; - m_interface = 0; + m_interface = nullptr; if(!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.gnome.SettingsDaemon")) { qWarning("MediaKeys: gnome settings daemon is not running"); diff --git a/src/plugins/General/gnomehotkey/mediakeys.h b/src/plugins/General/gnomehotkey/mediakeys.h index 6533b3443..4fb0028fe 100644 --- a/src/plugins/General/gnomehotkey/mediakeys.h +++ b/src/plugins/General/gnomehotkey/mediakeys.h @@ -33,7 +33,7 @@ class MediaKeys : public QObject { Q_OBJECT public: - explicit MediaKeys(QObject *parent = 0); + explicit MediaKeys(QObject *parent = nullptr); virtual ~MediaKeys(); private slots: diff --git a/src/plugins/General/hal/haldevice.h b/src/plugins/General/hal/haldevice.h index 934d7f8a1..08583fe0e 100644 --- a/src/plugins/General/hal/haldevice.h +++ b/src/plugins/General/hal/haldevice.h @@ -46,7 +46,7 @@ class HalDevice : public QObject { Q_OBJECT public: - HalDevice(const QString &udi, QObject *parent = 0); + HalDevice(const QString &udi, QObject *parent = nullptr); ~HalDevice(); diff --git a/src/plugins/General/hal/halmanager.h b/src/plugins/General/hal/halmanager.h index ef81feab9..6c2eb2b8e 100644 --- a/src/plugins/General/hal/halmanager.h +++ b/src/plugins/General/hal/halmanager.h @@ -32,7 +32,7 @@ class HalManager : public QObject { Q_OBJECT public: - HalManager(QObject *parent = 0); + HalManager(QObject *parent = nullptr); ~HalManager(); diff --git a/src/plugins/General/hal/halplugin.cpp b/src/plugins/General/hal/halplugin.cpp index cd4ee96de..d3477fec9 100644 --- a/src/plugins/General/hal/halplugin.cpp +++ b/src/plugins/General/hal/halplugin.cpp @@ -210,7 +210,7 @@ QAction *HalPlugin::findAction(const QString &dev_path) if (action->data().toString() == dev_path) return action; } - return 0; + return nullptr; } HalDevice *HalPlugin::findDevice(QAction *action) @@ -232,7 +232,7 @@ HalDevice *HalPlugin::findDevice(QAction *action) return device; } } - return 0; + return nullptr; } void HalPlugin::addPath(const QString &path) diff --git a/src/plugins/General/hal/halplugin.h b/src/plugins/General/hal/halplugin.h index e618a1e76..9a2169f3a 100644 --- a/src/plugins/General/hal/halplugin.h +++ b/src/plugins/General/hal/halplugin.h @@ -36,7 +36,7 @@ class HalPlugin : public QObject { Q_OBJECT public: - HalPlugin(QObject *parent = 0); + HalPlugin(QObject *parent = nullptr); ~HalPlugin(); diff --git a/src/plugins/General/hal/settingsdialog.h b/src/plugins/General/hal/settingsdialog.h index 6bd6b602f..604483326 100644 --- a/src/plugins/General/hal/settingsdialog.h +++ b/src/plugins/General/hal/settingsdialog.h @@ -31,7 +31,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/history/dateinputdialog.h b/src/plugins/General/history/dateinputdialog.h index 2259de255..1bcb64e68 100644 --- a/src/plugins/General/history/dateinputdialog.h +++ b/src/plugins/General/history/dateinputdialog.h @@ -33,7 +33,7 @@ class DateInputDialog : public QDialog Q_OBJECT public: - explicit DateInputDialog(QWidget *parent = 0); + explicit DateInputDialog(QWidget *parent = nullptr); ~DateInputDialog(); QDate selectedDate() const; diff --git a/src/plugins/General/history/history.h b/src/plugins/General/history/history.h index 07d65be0c..d044bc0ae 100644 --- a/src/plugins/General/history/history.h +++ b/src/plugins/General/history/history.h @@ -36,7 +36,7 @@ class History : public QObject { Q_OBJECT public: - explicit History(QObject *parent = 0); + explicit History(QObject *parent = nullptr); ~History(); private slots: diff --git a/src/plugins/General/history/historysettingsdialog.h b/src/plugins/General/history/historysettingsdialog.h index b21e03cd7..f9efef1b5 100644 --- a/src/plugins/General/history/historysettingsdialog.h +++ b/src/plugins/General/history/historysettingsdialog.h @@ -32,7 +32,7 @@ class HistorySettingsDialog : public QDialog Q_OBJECT public: - explicit HistorySettingsDialog(QWidget *parent = 0); + explicit HistorySettingsDialog(QWidget *parent = nullptr); ~HistorySettingsDialog(); public slots: diff --git a/src/plugins/General/history/historywindow.h b/src/plugins/General/history/historywindow.h index 7736b5e7d..88d81e887 100644 --- a/src/plugins/General/history/historywindow.h +++ b/src/plugins/General/history/historywindow.h @@ -35,7 +35,7 @@ class HistoryWindow : public QWidget { Q_OBJECT public: - explicit HistoryWindow(QSqlDatabase db, QWidget *parent = 0); + explicit HistoryWindow(QSqlDatabase db, QWidget *parent = nullptr); ~HistoryWindow(); private slots: diff --git a/src/plugins/General/history/progressbaritemdelegate.h b/src/plugins/General/history/progressbaritemdelegate.h index 9e8cf8e50..2eef87b91 100644 --- a/src/plugins/General/history/progressbaritemdelegate.h +++ b/src/plugins/General/history/progressbaritemdelegate.h @@ -35,7 +35,7 @@ class ProgressBarItemDelegate : public QStyledItemDelegate { Q_OBJECT public: - explicit ProgressBarItemDelegate(QObject *parent = 0); + explicit ProgressBarItemDelegate(QObject *parent = nullptr); void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; diff --git a/src/plugins/General/hotkey/hotkeydialog.h b/src/plugins/General/hotkey/hotkeydialog.h index 4124e8c8f..4bae2d01b 100644 --- a/src/plugins/General/hotkey/hotkeydialog.h +++ b/src/plugins/General/hotkey/hotkeydialog.h @@ -33,7 +33,7 @@ class HotkeyDialog : public QDialog { Q_OBJECT public: - HotkeyDialog(quint32 key, quint32 mod, QWidget *parent = 0); + HotkeyDialog(quint32 key, quint32 mod, QWidget *parent = nullptr); ~HotkeyDialog(); diff --git a/src/plugins/General/hotkey/hotkeymanager.h b/src/plugins/General/hotkey/hotkeymanager.h index ec5278982..45692cf1e 100644 --- a/src/plugins/General/hotkey/hotkeymanager.h +++ b/src/plugins/General/hotkey/hotkeymanager.h @@ -70,7 +70,7 @@ class HotkeyManager : public QObject, public QAbstractNativeEventFilter { Q_OBJECT public: - HotkeyManager(QObject *parent = 0); + HotkeyManager(QObject *parent = nullptr); ~HotkeyManager(); diff --git a/src/plugins/General/hotkey/settingsdialog.cpp b/src/plugins/General/hotkey/settingsdialog.cpp index 2830e58ee..7a5bd612d 100644 --- a/src/plugins/General/hotkey/settingsdialog.cpp +++ b/src/plugins/General/hotkey/settingsdialog.cpp @@ -86,7 +86,7 @@ void SettingsDialog::accept() void SettingsDialog::on_tableWidget_itemDoubleClicked (QTableWidgetItem *item) { - Hotkey *k = 0; + Hotkey *k = nullptr; foreach(k, m_hotkeys) { if (k->action == item->type()) diff --git a/src/plugins/General/hotkey/settingsdialog.h b/src/plugins/General/hotkey/settingsdialog.h index e1fde23ec..da947e681 100644 --- a/src/plugins/General/hotkey/settingsdialog.h +++ b/src/plugins/General/hotkey/settingsdialog.h @@ -32,7 +32,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/kdenotify/kdenotify.h b/src/plugins/General/kdenotify/kdenotify.h index c75696443..b82dd1e5d 100644 --- a/src/plugins/General/kdenotify/kdenotify.h +++ b/src/plugins/General/kdenotify/kdenotify.h @@ -36,7 +36,7 @@ class KdeNotify : public QObject { Q_OBJECT public: - KdeNotify(QObject *parent = 0); + KdeNotify(QObject *parent = nullptr); ~KdeNotify(); private: diff --git a/src/plugins/General/kdenotify/settingsdialog.h b/src/plugins/General/kdenotify/settingsdialog.h index 3ec2baf8a..835a39ad0 100644 --- a/src/plugins/General/kdenotify/settingsdialog.h +++ b/src/plugins/General/kdenotify/settingsdialog.h @@ -32,7 +32,7 @@ class SettingsDialog : public QDialog Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); public slots: diff --git a/src/plugins/General/lyrics/lyrics.h b/src/plugins/General/lyrics/lyrics.h index 663fe4af5..16523a30e 100644 --- a/src/plugins/General/lyrics/lyrics.h +++ b/src/plugins/General/lyrics/lyrics.h @@ -37,7 +37,7 @@ class Lyrics : public QObject { Q_OBJECT public: - Lyrics(QObject *parent = 0); + Lyrics(QObject *parent = nullptr); ~Lyrics(); diff --git a/src/plugins/General/lyrics/lyricsfactory.cpp b/src/plugins/General/lyrics/lyricsfactory.cpp index 1b5cac3e2..aef4322f9 100644 --- a/src/plugins/General/lyrics/lyricsfactory.cpp +++ b/src/plugins/General/lyrics/lyricsfactory.cpp @@ -42,7 +42,7 @@ QObject *LyricsFactory::create(QObject *parent) QDialog *LyricsFactory::createConfigDialog(QWidget *parent) { Q_UNUSED(parent); - return 0; + return nullptr; } void LyricsFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/lyrics/lyricswindow.cpp b/src/plugins/General/lyrics/lyricswindow.cpp index 39626c1ec..fa26ca049 100644 --- a/src/plugins/General/lyrics/lyricswindow.cpp +++ b/src/plugins/General/lyrics/lyricswindow.cpp @@ -37,7 +37,7 @@ LyricsWindow::LyricsWindow(const QString &artist, const QString &title, QWidget setWindowFlags(Qt::Dialog); setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_QuitOnClose, false); - m_requestReply = 0; + m_requestReply = nullptr; m_cachePath = Qmmp::configDir() + "/lyrics/"; m_ui.artistLineEdit->setText(artist); m_ui.titleLineEdit->setText(title); @@ -78,7 +78,7 @@ void LyricsWindow::showText(QNetworkReply *reply) { m_ui.stateLabel->setText(tr("Error")); m_ui.textBrowser->setText(reply->errorString()); - m_requestReply = 0; + m_requestReply = nullptr; reply->deleteLater(); return; } @@ -87,7 +87,7 @@ void LyricsWindow::showText(QNetworkReply *reply) if(m_requestReply == reply) { - m_requestReply = 0; + m_requestReply = nullptr; reply->deleteLater(); QRegExp artist_regexp("<artist>(.*)</artist>"); artist_regexp.setMinimal(true); diff --git a/src/plugins/General/lyrics/lyricswindow.h b/src/plugins/General/lyrics/lyricswindow.h index 7ccec881f..564fb5a10 100644 --- a/src/plugins/General/lyrics/lyricswindow.h +++ b/src/plugins/General/lyrics/lyricswindow.h @@ -34,7 +34,7 @@ class LyricsWindow : public QWidget { Q_OBJECT public: - LyricsWindow(const QString &artist, const QString &title, QWidget *parent = 0); + LyricsWindow(const QString &artist, const QString &title, QWidget *parent = nullptr); ~LyricsWindow(); diff --git a/src/plugins/General/mpris/mpris.h b/src/plugins/General/mpris/mpris.h index c6bffef50..a13ce2d96 100644 --- a/src/plugins/General/mpris/mpris.h +++ b/src/plugins/General/mpris/mpris.h @@ -33,7 +33,7 @@ class MPRIS : public QObject { Q_OBJECT public: - MPRIS(QObject *parent = 0); + MPRIS(QObject *parent = nullptr); ~MPRIS(); }; diff --git a/src/plugins/General/mpris/mpris2/player2object.cpp b/src/plugins/General/mpris/mpris2/player2object.cpp index 962d8a618..aae3cdda6 100644 --- a/src/plugins/General/mpris/mpris2/player2object.cpp +++ b/src/plugins/General/mpris/mpris2/player2object.cpp @@ -32,7 +32,7 @@ Player2Object::Player2Object(QObject *parent) : QDBusAbstractAdaptor(parent) { - m_prev_track = 0; + m_prev_track = nullptr; m_previous_pos = 0; m_core = SoundCore::instance(); m_player = MediaPlayer::instance(); @@ -49,7 +49,7 @@ Player2Object::Player2Object(QObject *parent) : QDBusAbstractAdaptor(parent) connect(m_ui_settings, SIGNAL(shuffleChanged(bool)), SLOT(emitPropertiesChanged())); connect(m_pl_manager, SIGNAL(currentPlayListChanged(PlayListModel*,PlayListModel*)), SLOT(setModel(PlayListModel*,PlayListModel*))); - setModel(m_pl_manager->currentPlayList(), 0); + setModel(m_pl_manager->currentPlayList(), nullptr); updateId(); syncProperties(); } @@ -64,7 +64,7 @@ bool Player2Object::canControl() const bool Player2Object::canGoNext() const { - return m_pl_manager->currentPlayList()->nextTrack() != 0; + return m_pl_manager->currentPlayList()->nextTrack() != nullptr; } bool Player2Object::canGoPrevious() const @@ -371,7 +371,7 @@ void Player2Object::disconnectPl() void Player2Object::setModel(PlayListModel *selected, PlayListModel *previous) { if(previous) - disconnect(previous, 0, this, 0); //disconnect previous model + disconnect(previous, nullptr, this, nullptr); //disconnect previous model connect(selected, SIGNAL(listChanged(int)), SLOT(emitPropertiesChanged())); } diff --git a/src/plugins/General/mpris/mpris2/player2object.h b/src/plugins/General/mpris/mpris2/player2object.h index 901364181..af69844a4 100644 --- a/src/plugins/General/mpris/mpris2/player2object.h +++ b/src/plugins/General/mpris/mpris2/player2object.h @@ -58,7 +58,7 @@ Q_PROPERTY(bool Shuffle READ shuffle WRITE setShuffle) Q_PROPERTY(double Volume READ volume WRITE setVolume) public: - Player2Object(QObject *parent = 0); + Player2Object(QObject *parent = nullptr); virtual ~Player2Object(); bool canControl() const; bool canGoNext() const; diff --git a/src/plugins/General/mpris/mpris2/root2object.h b/src/plugins/General/mpris/mpris2/root2object.h index c7b39892b..762e04655 100644 --- a/src/plugins/General/mpris/mpris2/root2object.h +++ b/src/plugins/General/mpris/mpris2/root2object.h @@ -39,7 +39,7 @@ Q_PROPERTY(QStringList SupportedMimeTypes READ supportedMimeTypes) Q_PROPERTY(QStringList SupportedUriSchemes READ supportedUriSchemes) public: - Root2Object(QObject *parent = 0); + Root2Object(QObject *parent = nullptr); virtual ~Root2Object(); bool canQuit() const; diff --git a/src/plugins/General/mpris/mprisfactory.cpp b/src/plugins/General/mpris/mprisfactory.cpp index a43139505..338b8f302 100644 --- a/src/plugins/General/mpris/mprisfactory.cpp +++ b/src/plugins/General/mpris/mprisfactory.cpp @@ -42,7 +42,7 @@ QObject *MPRISFactory::create(QObject *parent) QDialog *MPRISFactory::createConfigDialog(QWidget *) { - return 0; + return nullptr; } void MPRISFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/notifier/notifier.cpp b/src/plugins/General/notifier/notifier.cpp index 20b5b6195..127d9adf6 100644 --- a/src/plugins/General/notifier/notifier.cpp +++ b/src/plugins/General/notifier/notifier.cpp @@ -41,7 +41,7 @@ Notifier::Notifier(QObject *parent) : QObject(parent) { - m_popupWidget = 0; + m_popupWidget = nullptr; m_l = -1; m_r = -1; m_isPaused = false; diff --git a/src/plugins/General/notifier/notifier.h b/src/plugins/General/notifier/notifier.h index 6b0317b30..c612711e7 100644 --- a/src/plugins/General/notifier/notifier.h +++ b/src/plugins/General/notifier/notifier.h @@ -36,7 +36,7 @@ class Notifier : public QObject { Q_OBJECT public: - Notifier(QObject *parent = 0); + Notifier(QObject *parent = nullptr); virtual~Notifier(); diff --git a/src/plugins/General/notifier/popupwidget.h b/src/plugins/General/notifier/popupwidget.h index f06b4c4d3..6c685c482 100644 --- a/src/plugins/General/notifier/popupwidget.h +++ b/src/plugins/General/notifier/popupwidget.h @@ -36,7 +36,7 @@ class PopupWidget : public QFrame { Q_OBJECT public: - PopupWidget(QWidget *parent = 0); + PopupWidget(QWidget *parent = nullptr); ~PopupWidget(); diff --git a/src/plugins/General/notifier/settingsdialog.h b/src/plugins/General/notifier/settingsdialog.h index fda8434c4..80a7284f2 100644 --- a/src/plugins/General/notifier/settingsdialog.h +++ b/src/plugins/General/notifier/settingsdialog.h @@ -32,7 +32,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); virtual ~SettingsDialog(); diff --git a/src/plugins/General/rdetect/settingsdialog.h b/src/plugins/General/rdetect/settingsdialog.h index 85ab9ed4b..ff033adcc 100644 --- a/src/plugins/General/rdetect/settingsdialog.h +++ b/src/plugins/General/rdetect/settingsdialog.h @@ -30,7 +30,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/rgscan/rgscandialog.cpp b/src/plugins/General/rgscan/rgscandialog.cpp index c2814b60c..0818ee26d 100644 --- a/src/plugins/General/rgscan/rgscandialog.cpp +++ b/src/plugins/General/rgscan/rgscandialog.cpp @@ -270,7 +270,7 @@ RGScanner *RGScanDialog::findScannerByUrl(const QString &url) if(scanner->url() == url) return scanner; } - return 0; + return nullptr; } QString RGScanDialog::getAlbumName(const QString &url) diff --git a/src/plugins/General/rgscan/rgscandialog.h b/src/plugins/General/rgscan/rgscandialog.h index 18dcda9ad..22f5e457b 100644 --- a/src/plugins/General/rgscan/rgscandialog.h +++ b/src/plugins/General/rgscan/rgscandialog.h @@ -61,7 +61,7 @@ class RGScanDialog : public QDialog { Q_OBJECT public: - explicit RGScanDialog(QList <PlayListTrack *> tracks, QWidget *parent = 0); + explicit RGScanDialog(QList <PlayListTrack *> tracks, QWidget *parent = nullptr); virtual ~RGScanDialog(); private slots: diff --git a/src/plugins/General/rgscan/rgscanfactory.cpp b/src/plugins/General/rgscan/rgscanfactory.cpp index 9e68e89a9..18998ac2c 100644 --- a/src/plugins/General/rgscan/rgscanfactory.cpp +++ b/src/plugins/General/rgscan/rgscanfactory.cpp @@ -41,7 +41,7 @@ QObject *RGScanFactory::create(QObject *parent) QDialog *RGScanFactory::createConfigDialog(QWidget *parent) { Q_UNUSED(parent); - return 0; + return nullptr; } void RGScanFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/rgscan/rgscanhelper.h b/src/plugins/General/rgscan/rgscanhelper.h index bc67a700b..e68f857a0 100644 --- a/src/plugins/General/rgscan/rgscanhelper.h +++ b/src/plugins/General/rgscan/rgscanhelper.h @@ -33,7 +33,7 @@ class RGScanHelper : public QObject { Q_OBJECT public: - RGScanHelper(QObject *parent = 0); + RGScanHelper(QObject *parent = nullptr); ~RGScanHelper(); private slots: diff --git a/src/plugins/General/rgscan/rgscanner.cpp b/src/plugins/General/rgscan/rgscanner.cpp index e1311bd97..13ff79cdf 100644 --- a/src/plugins/General/rgscan/rgscanner.cpp +++ b/src/plugins/General/rgscan/rgscanner.cpp @@ -35,9 +35,9 @@ RGScanner::RGScanner() m_is_running = false; m_is_pending = false; m_has_values = false; - m_handle = 0; - m_decoder = 0; - m_source = 0; + m_handle = nullptr; + m_decoder = nullptr; + m_source = nullptr; } RGScanner::~RGScanner() @@ -47,7 +47,7 @@ RGScanner::~RGScanner() if(m_handle) { DeinitGainAnalysis(m_handle); - m_handle = 0; + m_handle = nullptr; } } @@ -57,7 +57,7 @@ bool RGScanner::prepare(const QString &url) deinit(); m_url = url; QString name = m_url.section("/", -1); - InputSource *source = InputSource::create(url, 0); + InputSource *source = InputSource::create(url, nullptr); if(!source->initialize()) { delete source; @@ -273,11 +273,11 @@ void RGScanner::deinit() if(m_decoder) { delete m_decoder; - m_decoder = 0; + m_decoder = nullptr; } if(m_source) { delete m_source; - m_source = 0; + m_source = nullptr; } } diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp index 468a88bd6..6082b237a 100644 --- a/src/plugins/General/scrobbler/scrobbler.cpp +++ b/src/plugins/General/scrobbler/scrobbler.cpp @@ -82,9 +82,9 @@ void ScrobblerResponse::parse(QIODevice *device) Scrobbler::Scrobbler(const QString &scrobblerUrl, const QString &name, QObject *parent) : QObject(parent) { - m_notificationReply = 0; + m_notificationReply = nullptr; m_submitedSongs = 0; - m_submitReply = 0; + m_submitReply = nullptr; m_previousState = Qmmp::Stopped; m_elapsed = 0; m_scrobblerUrl = scrobblerUrl; @@ -211,7 +211,7 @@ void Scrobbler::processResponse(QNetworkReply *reply) if (reply == m_submitReply) { - m_submitReply = 0; + m_submitReply = nullptr; if (response.status == "ok") { qDebug("Scrobbler[%s]: submited %d song(s)", qPrintable(m_name), m_submitedSongs); @@ -248,7 +248,7 @@ void Scrobbler::processResponse(QNetworkReply *reply) } else if (reply == m_notificationReply) { - m_notificationReply = 0; + m_notificationReply = nullptr; if(response.status == "ok") { qDebug("Scrobbler[%s]: Now-Playing notification done", qPrintable(m_name)); @@ -386,8 +386,8 @@ void Scrobbler::sendNotification(const SongInfo &info) ScrobblerAuth::ScrobblerAuth(const QString &scrobblerUrl, const QString &authUrl, const QString &name, QObject *parent) : QObject(parent) { - m_getTokenReply = 0; - m_getSessionReply = 0; + m_getTokenReply = nullptr; + m_getSessionReply = nullptr; m_scrobblerUrl = scrobblerUrl; m_authUrl = authUrl; m_name = name; @@ -522,7 +522,7 @@ void ScrobblerAuth::processResponse(QNetworkReply *reply) if (reply == m_getTokenReply) { - m_getTokenReply = 0; + m_getTokenReply = nullptr; if(response.status == "ok") { m_token = response.token; @@ -548,7 +548,7 @@ void ScrobblerAuth::processResponse(QNetworkReply *reply) } else if(reply == m_getSessionReply) { - m_getSessionReply = 0; + m_getSessionReply = nullptr; m_session.clear(); if(response.status == "ok") { @@ -586,7 +586,7 @@ void ScrobblerAuth::processResponse(QNetworkReply *reply) } else if(reply == m_checkSessionReply) { - m_checkSessionReply = 0; + m_checkSessionReply = nullptr; if(response.status == "ok") { qDebug("ScrobblerAuth[%s]: session ok", qPrintable(m_name)); diff --git a/src/plugins/General/scrobbler/scrobbler.h b/src/plugins/General/scrobbler/scrobbler.h index d87a92778..8efb39098 100644 --- a/src/plugins/General/scrobbler/scrobbler.h +++ b/src/plugins/General/scrobbler/scrobbler.h @@ -56,7 +56,7 @@ class Scrobbler : public QObject { Q_OBJECT public: - Scrobbler(const QString &scrobblerUrl, const QString &name,QObject *parent = 0); + Scrobbler(const QString &scrobblerUrl, const QString &name,QObject *parent = nullptr); ~Scrobbler(); private slots: @@ -93,7 +93,7 @@ class ScrobblerAuth : public QObject Q_OBJECT public: explicit ScrobblerAuth(const QString &scrobblerUrl, const QString &authUrl, - const QString &name, QObject *parent = 0); + const QString &name, QObject *parent = nullptr); void getToken(); void getSession(); void checkSession(const QString &session); diff --git a/src/plugins/General/scrobbler/scrobblerhandler.h b/src/plugins/General/scrobbler/scrobblerhandler.h index b9eb37aa4..9a923bf87 100644 --- a/src/plugins/General/scrobbler/scrobblerhandler.h +++ b/src/plugins/General/scrobbler/scrobblerhandler.h @@ -33,7 +33,7 @@ class ScrobblerHandler : public QObject Q_OBJECT public: - ScrobblerHandler(QObject *parent = 0); + ScrobblerHandler(QObject *parent = nullptr); ~ScrobblerHandler(); }; diff --git a/src/plugins/General/scrobbler/settingsdialog.h b/src/plugins/General/scrobbler/settingsdialog.h index 953bc330f..b82af0029 100644 --- a/src/plugins/General/scrobbler/settingsdialog.h +++ b/src/plugins/General/scrobbler/settingsdialog.h @@ -32,7 +32,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/statusicon/coverwidget.h b/src/plugins/General/statusicon/coverwidget.h index 36888062c..7434b5ea4 100644 --- a/src/plugins/General/statusicon/coverwidget.h +++ b/src/plugins/General/statusicon/coverwidget.h @@ -31,7 +31,7 @@ class CoverWidget : public QWidget { Q_OBJECT public: - CoverWidget(QWidget *parent = 0); + CoverWidget(QWidget *parent = nullptr); ~CoverWidget(); diff --git a/src/plugins/General/statusicon/qmmptrayicon.h b/src/plugins/General/statusicon/qmmptrayicon.h index 220b59929..190d52a73 100644 --- a/src/plugins/General/statusicon/qmmptrayicon.h +++ b/src/plugins/General/statusicon/qmmptrayicon.h @@ -36,7 +36,7 @@ class QmmpTrayIcon : public QSystemTrayIcon { Q_OBJECT public: - QmmpTrayIcon(QObject *parent = 0); + QmmpTrayIcon(QObject *parent = nullptr); ~QmmpTrayIcon(); void setToolTip(const QString &tip); diff --git a/src/plugins/General/statusicon/settingsdialog.h b/src/plugins/General/statusicon/settingsdialog.h index afb2f0327..776172129 100644 --- a/src/plugins/General/statusicon/settingsdialog.h +++ b/src/plugins/General/statusicon/settingsdialog.h @@ -30,7 +30,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/statusicon/statusicon.h b/src/plugins/General/statusicon/statusicon.h index f40cbcb5a..6225b977d 100644 --- a/src/plugins/General/statusicon/statusicon.h +++ b/src/plugins/General/statusicon/statusicon.h @@ -40,7 +40,7 @@ class StatusIcon : public QObject { Q_OBJECT public: - StatusIcon(QObject *parent = 0); + StatusIcon(QObject *parent = nullptr); ~StatusIcon(); diff --git a/src/plugins/General/statusicon/statusiconpopupwidget.h b/src/plugins/General/statusicon/statusiconpopupwidget.h index 7a9aaa7a4..906435933 100644 --- a/src/plugins/General/statusicon/statusiconpopupwidget.h +++ b/src/plugins/General/statusicon/statusiconpopupwidget.h @@ -43,7 +43,7 @@ class StatusIconPopupWidget : public QFrame Q_OBJECT public: - StatusIconPopupWidget(QWidget * parent = 0); + StatusIconPopupWidget(QWidget *parent = nullptr); ~StatusIconPopupWidget(); void showInfo(int x, int y, const QString &message); //x,y are tray icon position @@ -75,7 +75,7 @@ class TimeBar : public QProgressBar { Q_OBJECT public: - TimeBar(QWidget *parent = 0); + TimeBar(QWidget *parent = nullptr); virtual QString text() const; }; diff --git a/src/plugins/General/streambrowser/editstreamdialog.h b/src/plugins/General/streambrowser/editstreamdialog.h index a0e24ce3a..4f6ddc500 100644 --- a/src/plugins/General/streambrowser/editstreamdialog.h +++ b/src/plugins/General/streambrowser/editstreamdialog.h @@ -33,7 +33,7 @@ class EditStreamDialog : public QDialog Q_OBJECT public: - explicit EditStreamDialog(QWidget *parent = 0); + explicit EditStreamDialog(QWidget *parent = nullptr); ~EditStreamDialog(); enum Key diff --git a/src/plugins/General/streambrowser/streambrowser.h b/src/plugins/General/streambrowser/streambrowser.h index 0f23644d8..7ea50e575 100644 --- a/src/plugins/General/streambrowser/streambrowser.h +++ b/src/plugins/General/streambrowser/streambrowser.h @@ -35,7 +35,7 @@ class StreamBrowser : public QObject { Q_OBJECT public: - StreamBrowser(QObject *parent = 0); + StreamBrowser(QObject *parent = nullptr); ~StreamBrowser(); diff --git a/src/plugins/General/streambrowser/streambrowserfactory.cpp b/src/plugins/General/streambrowser/streambrowserfactory.cpp index 655a7adfb..4b2fc70c3 100644 --- a/src/plugins/General/streambrowser/streambrowserfactory.cpp +++ b/src/plugins/General/streambrowser/streambrowserfactory.cpp @@ -42,7 +42,7 @@ QObject *StreamBrowserFactory::create(QObject *parent) QDialog *StreamBrowserFactory::createConfigDialog(QWidget *parent) { Q_UNUSED(parent); - return 0; + return nullptr; } void StreamBrowserFactory::showAbout(QWidget *parent) diff --git a/src/plugins/General/streambrowser/streamwindow.cpp b/src/plugins/General/streambrowser/streamwindow.cpp index 6bf73f6d4..e5dadd958 100644 --- a/src/plugins/General/streambrowser/streamwindow.cpp +++ b/src/plugins/General/streambrowser/streamwindow.cpp @@ -47,7 +47,7 @@ StreamWindow::StreamWindow(QWidget *parent) setWindowFlags(Qt::Window); setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_QuitOnClose, false); - m_requestReply = 0; + m_requestReply = nullptr; //buttons m_ui->addPushButton->setIcon(QIcon::fromTheme("list-add")); m_ui->updatePushButton->setIcon(QIcon::fromTheme("view-refresh")); @@ -153,13 +153,13 @@ void StreamWindow::showText(QNetworkReply *reply) { m_ui->statusLabel->setText(tr("Error")); QMessageBox::warning (this, tr("Error"), reply->errorString()); - m_requestReply = 0; + m_requestReply = nullptr; reply->deleteLater(); return; } if(m_requestReply == reply) { - m_requestReply = 0; + m_requestReply = nullptr; readXml(reply, m_iceCastModel); } reply->deleteLater(); diff --git a/src/plugins/General/streambrowser/streamwindow.h b/src/plugins/General/streambrowser/streamwindow.h index c36c54b69..58512c9c1 100644 --- a/src/plugins/General/streambrowser/streamwindow.h +++ b/src/plugins/General/streambrowser/streamwindow.h @@ -42,7 +42,7 @@ class StreamWindow : public QWidget { Q_OBJECT public: - StreamWindow(QWidget *parent = 0); + StreamWindow(QWidget *parent = nullptr); ~StreamWindow(); diff --git a/src/plugins/General/taskbar/taskbarhelper.h b/src/plugins/General/taskbar/taskbarhelper.h index d139f848f..db4082c12 100644 --- a/src/plugins/General/taskbar/taskbarhelper.h +++ b/src/plugins/General/taskbar/taskbarhelper.h @@ -36,7 +36,7 @@ class TaskbarHelper : public QObject {
Q_OBJECT
public:
- TaskbarHelper(QObject *parent = 0);
+ TaskbarHelper(QObject *parent = nullptr);
~TaskbarHelper();
private slots:
diff --git a/src/plugins/General/trackchange/settingsdialog.h b/src/plugins/General/trackchange/settingsdialog.h index dfb022577..57b9a350f 100644 --- a/src/plugins/General/trackchange/settingsdialog.h +++ b/src/plugins/General/trackchange/settingsdialog.h @@ -33,7 +33,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/trackchange/trackchange.h b/src/plugins/General/trackchange/trackchange.h index 0ea02ad43..5cfba8e9d 100644 --- a/src/plugins/General/trackchange/trackchange.h +++ b/src/plugins/General/trackchange/trackchange.h @@ -36,7 +36,7 @@ class TrackChange : public QObject { Q_OBJECT public: - TrackChange(QObject *parent = 0); + TrackChange(QObject *parent = nullptr); ~TrackChange(); diff --git a/src/plugins/General/udisks2/settingsdialog.h b/src/plugins/General/udisks2/settingsdialog.h index 8a6f1cc5b..c8191f380 100644 --- a/src/plugins/General/udisks2/settingsdialog.h +++ b/src/plugins/General/udisks2/settingsdialog.h @@ -30,7 +30,7 @@ class SettingsDialog : public QDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent = 0); + SettingsDialog(QWidget *parent = nullptr); ~SettingsDialog(); diff --git a/src/plugins/General/udisks2/udisks2device.h b/src/plugins/General/udisks2/udisks2device.h index 8fcca4c6f..4b0e9543c 100644 --- a/src/plugins/General/udisks2/udisks2device.h +++ b/src/plugins/General/udisks2/udisks2device.h @@ -65,7 +65,7 @@ class UDisks2Device : public QObject { Q_OBJECT public: - UDisks2Device(QDBusObjectPath o, QObject *parent = 0); + UDisks2Device(QDBusObjectPath o, QObject *parent = nullptr); ~UDisks2Device(); diff --git a/src/plugins/General/udisks2/udisks2manager.h b/src/plugins/General/udisks2/udisks2manager.h index cbd1e2fe1..2b4e705fe 100644 --- a/src/plugins/General/udisks2/udisks2manager.h +++ b/src/plugins/General/udisks2/udisks2manager.h @@ -37,7 +37,7 @@ class UDisks2Manager : public QObject { Q_OBJECT public: - UDisks2Manager(QObject *parent = 0); + UDisks2Manager(QObject *parent = nullptr); ~UDisks2Manager(); diff --git a/src/plugins/General/udisks2/udisks2plugin.cpp b/src/plugins/General/udisks2/udisks2plugin.cpp index 84327f866..fdae8b923 100644 --- a/src/plugins/General/udisks2/udisks2plugin.cpp +++ b/src/plugins/General/udisks2/udisks2plugin.cpp @@ -184,7 +184,7 @@ QAction *UDisks2Plugin::findAction(const QString &dev_path) if (action->data().toString() == dev_path) return action; } - return 0; + return nullptr; } UDisks2Device *UDisks2Plugin::findDevice(QAction *action) @@ -205,7 +205,7 @@ UDisks2Device *UDisks2Plugin::findDevice(QAction *action) return device; } } - return 0; + return nullptr; } void UDisks2Plugin::addPath(const QString &path) diff --git a/src/plugins/General/udisks2/udisks2plugin.h b/src/plugins/General/udisks2/udisks2plugin.h index ed3130da0..a5d428220 100644 --- a/src/plugins/General/udisks2/udisks2plugin.h +++ b/src/plugins/General/udisks2/udisks2plugin.h @@ -36,7 +36,7 @@ class UDisks2Plugin : public QObject { Q_OBJECT public: - UDisks2Plugin(QObject *parent = 0); + UDisks2Plugin(QObject *parent = nullptr); ~UDisks2Plugin(); |
