summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2019-11-23 03:43:41 +0100
committerArno <arno@disconnect.de>2019-11-23 03:43:41 +0100
commit1e3926c2caba595b16c4e03366c39e34c7581238 (patch)
tree208cdcb6c32fa638de7268d779bd1970a48ed0b9
parent35289988e17743fea33ad82d1d4c620d6289d2fb (diff)
downloadShemovCleaner-1e3926c2caba595b16c4e03366c39e34c7581238.tar.gz
ShemovCleaner-1e3926c2caba595b16c4e03366c39e34c7581238.tar.bz2
ShemovCleaner-1e3926c2caba595b16c4e03366c39e34c7581238.zip
Fix deprecation warnings
Apparently QFontMetrics::width will be replaced by the much more intuitive QFontMetrics::horizontalAdvance. Also, QTreeView::sortBy must be called with a Qt::SortOrder as second argument.
-rw-r--r--helper.cpp2
-rw-r--r--searchdialog.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/helper.cpp b/helper.cpp
index 30b7604..fa96939 100644
--- a/helper.cpp
+++ b/helper.cpp
@@ -114,7 +114,7 @@ namespace Helper {
Duration dur(offset);
QFont font("Monospace", 10);
QFontMetrics fm(font);
- int width = fm.width(dur.toString());
+ int width = fm.horizontalAdvance(dur.toString());
int height = fm.height();
QPainter p(&retval);
p.setBrush(QBrush(QColor(255, 255, 255, 70)));
diff --git a/searchdialog.cpp b/searchdialog.cpp
index ada0741..c558471 100644
--- a/searchdialog.cpp
+++ b/searchdialog.cpp
@@ -182,7 +182,7 @@ void SearchDialog::doSearchFilename(){
root->appendRow(cur);
}
mResV->setSortingEnabled(true);
- mResV->sortByColumn(0);
+ mResV->sortByColumn(0, Qt::AscendingOrder);
}
void SearchDialog::doSearchActor(){