r23910 by jghali - Fix deprecation warning
scribus-commit
scribus-commit at lists.scribus.net
Thu Jul 2 01:00:04 UTC 2020
Author: jghali
Date: Thu Jul 2 01:00:03 2020
New Revision: 23910
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23910
Log:
Fix deprecation warning
Modified:
trunk/Scribus/scribus/ui/picstatus.cpp
Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23910&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp (original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp Thu Jul 2 01:00:03 2020
@@ -30,6 +30,7 @@
#include <QListWidget>
#include <QMenu>
#include <QMessageBox>
+#include <QMultiMap>
#include <QPainter>
#include <QPixmap>
#include <QPushButton>
@@ -199,19 +200,19 @@
void PicStatus::sortByName()
{
- QMap<QString, PicItem*> sorted;
+ QMultiMap<QString, PicItem*> sorted;
int num = imageViewArea->count();
if (num == 0)
return;
auto firstItem = imageViewArea->currentItem();
- for (int a = num-1; a > -1; --a)
- {
- QListWidgetItem *ite = imageViewArea->takeItem(a);
- PicItem *item = (PicItem*)ite;
+ for (int i = num - 1; i > -1; --i)
+ {
+ QListWidgetItem *ite = imageViewArea->takeItem(i);
+ PicItem *item = (PicItem*) ite;
QFileInfo fi = QFileInfo(item->PageItemObject->Pfile);
- sorted.insertMulti(fi.fileName(), item);
+ sorted.insert(fi.fileName(), item);
}
int counter = 0;
More information about the scribus-commit
mailing list