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 /src/plugins/General/rdetect | |
| 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
Diffstat (limited to 'src/plugins/General/rdetect')
| -rw-r--r-- | src/plugins/General/rdetect/removablehelper.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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)
|
