diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-09 16:52:30 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-09 16:52:30 +0000 |
| commit | 56331dc881bb1526cba8ad1807690ecf37f6249d (patch) | |
| tree | 077bea636d3e87c193e840f3b760ca056e7e0a53 | |
| parent | 463f4e95cff0e100b4c8c8b5378cfe1b2604c138 (diff) | |
| download | qmmp-56331dc881bb1526cba8ad1807690ecf37f6249d.tar.gz qmmp-56331dc881bb1526cba8ad1807690ecf37f6249d.tar.bz2 qmmp-56331dc881bb1526cba8ad1807690ecf37f6249d.zip | |
fixed build regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9069 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/app/builtincommandlineoption.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/General/listenbrainz/listenbrainz.cpp | 1 | ||||
| -rw-r--r-- | src/plugins/General/rdetect/removablehelper.cpp | 17 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.cpp | 1 | ||||
| -rw-r--r-- | src/qmmpui/winfileassoc.cpp | 4 |
5 files changed, 14 insertions, 11 deletions
diff --git a/src/app/builtincommandlineoption.cpp b/src/app/builtincommandlineoption.cpp index 5cbd90f66..99c281b07 100644 --- a/src/app/builtincommandlineoption.cpp +++ b/src/app/builtincommandlineoption.cpp @@ -101,7 +101,7 @@ QString BuiltinCommandLineOption::executeCommand(const QString &option_string, c if(args.isEmpty()) return out; QStringList full_path_list, remote_pls_list; - for(const QString &s : qAsConst(args)) + for(QString s : qAsConst(args)) { #ifdef Q_OS_WIN s.replace("\\","/"); diff --git a/src/plugins/General/listenbrainz/listenbrainz.cpp b/src/plugins/General/listenbrainz/listenbrainz.cpp index 44ea00ba0..4bb43d1d6 100644 --- a/src/plugins/General/listenbrainz/listenbrainz.cpp +++ b/src/plugins/General/listenbrainz/listenbrainz.cpp @@ -32,6 +32,7 @@ #include <QTimer> #include <QDesktopServices> #include <QSettings> +#include <QDateTime> #include <qmmp/soundcore.h> #include <qmmp/qmmpsettings.h> #include <qmmp/qmmp.h> diff --git a/src/plugins/General/rdetect/removablehelper.cpp b/src/plugins/General/rdetect/removablehelper.cpp index 0e891f5ca..0751a12c5 100644 --- a/src/plugins/General/rdetect/removablehelper.cpp +++ b/src/plugins/General/rdetect/removablehelper.cpp @@ -97,9 +97,9 @@ void RemovableHelper::processAction(QAction *action) void RemovableHelper::updateActions()
{
- QList<QStorageInfo> volumes = QStorageInfo::mountedVolumes();
+ const QList<QStorageInfo> volumes = QStorageInfo::mountedVolumes();
- foreach(const QStorageInfo &storage, volumes)
+ for(const QStorageInfo &storage : qAsConst(volumes))
{
if(!storage.isValid() || !storage.isReady())
continue;
@@ -155,11 +155,12 @@ void RemovableHelper::updateActions() }
}
// remove action if device is unmounted/removed
- for(const QAction *action : m_actions->actions())
+ const QList<QAction *> actions = m_actions->actions();
+ for(QAction *action : qAsConst(actions))
{
bool found = false;
- foreach(const QStorageInfo &storage, volumes)
+ for(const QStorageInfo &storage : qAsConst(volumes))
{
QString dev_path = storage.rootPath();
if(isAudioCd(dev_path))
@@ -188,7 +189,7 @@ void RemovableHelper::updateActions() QAction *RemovableHelper::findAction(const QString &dev_path)
{
- for(const QAction *action : m_actions->actions())
+ for(QAction *action : m_actions->actions())
{
if (action->data().toString() == dev_path)
return action;
@@ -200,7 +201,7 @@ void RemovableHelper::addPath(const QString &path) {
PlayListModel *model = PlayListManager::instance()->selectedPlayList();
- for(const PlayListItem *item : model->items()) // Is it already exist?
+ for(PlayListItem *item : model->items()) // Is it already exist?
{
if(item->isGroup())
continue;
@@ -210,11 +211,11 @@ void RemovableHelper::addPath(const QString &path) if (path.startsWith("cdda://") && m_addTracks)
{
- PlayListManager::instance()->selectedPlayList()->add(path);
+ model->add(path);
return;
}
else if (!path.startsWith("cdda://") && m_addFiles)
- PlayListManager::instance()->selectedPlayList()->add(path);
+ model->add(path);
}
void RemovableHelper::removePath(const QString &path)
diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp index 0a8b114f4..b103853fa 100644 --- a/src/plugins/General/scrobbler/scrobbler.cpp +++ b/src/plugins/General/scrobbler/scrobbler.cpp @@ -31,6 +31,7 @@ #include <QTimer> #include <QDesktopServices> #include <QSettings> +#include <QDateTime> #include <qmmp/soundcore.h> #include <qmmp/qmmpsettings.h> #include <qmmp/qmmp.h> diff --git a/src/qmmpui/winfileassoc.cpp b/src/qmmpui/winfileassoc.cpp index 9cb77b531..99e82e7e8 100644 --- a/src/qmmpui/winfileassoc.cpp +++ b/src/qmmpui/winfileassoc.cpp @@ -129,7 +129,7 @@ int WinFileAssoc::VistaSetAppsAsDefault(const QStringList &fileExtensions) int count = 0; if (SUCCEEDED(hr) && (pAAR != NULL)) { - foreach(const QString & fileExtension, fileExtensions) { + for(const QString &fileExtension : qAsConst(fileExtensions)) { hr = pAAR->SetAppAsDefault((const WCHAR *)m_AppName.utf16(), (const WCHAR *)QString("." + fileExtension).utf16(), AT_FILEEXTENSION); @@ -151,7 +151,7 @@ bool WinFileAssoc::VistaGetDefaultApps(const QStringList &extensions, QStringLis NULL, CLSCTX_INPROC, IID_IApplicationAssociationReg, (void **)&pAAR); if (SUCCEEDED(hr) && (pAAR != NULL)) { - foreach(const QString & fileExtension, extensions) { + for(const QString &fileExtension : qAsConst(extensions)) { BOOL bIsDefault = false; hr = pAAR->QueryAppIsDefault((const WCHAR *)QString("." + fileExtension).utf16(), AT_FILEEXTENSION, |
