summaryrefslogtreecommitdiff
path: root/ui/qt5
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-07-04 19:30:10 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-07-04 19:30:10 -0500
commit8fbf90db8029de5a7a73b553dbf3ab9d17ddacd6 (patch)
tree0048bee556b33e96984e131c4fccc34e8656c929 /ui/qt5
parent02e8b7d320d1c954ec93f784b6a3197a9a6fee2d (diff)
downloadhorizon-8fbf90db8029de5a7a73b553dbf3ab9d17ddacd6.tar.gz
horizon-8fbf90db8029de5a7a73b553dbf3ab9d17ddacd6.tar.bz2
horizon-8fbf90db8029de5a7a73b553dbf3ab9d17ddacd6.tar.xz
horizon-8fbf90db8029de5a7a73b553dbf3ab9d17ddacd6.zip
Qt UI: Refactor mount dialog partition display
*once again*, do things the more complex way instead of the simple way. (Sensing a pattern yet?!)
Diffstat (limited to 'ui/qt5')
-rw-r--r--ui/qt5/mountdialog.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/ui/qt5/mountdialog.cc b/ui/qt5/mountdialog.cc
index dcded49..c0a38cc 100644
--- a/ui/qt5/mountdialog.cc
+++ b/ui/qt5/mountdialog.cc
@@ -3,7 +3,7 @@
* horizon-qt5, the Qt 5 user interface for
* Project Horizon
*
- * Copyright (c) 2020 Adélie Linux and contributors. All rights reserved.
+ * Copyright (c) 2020-2022 Adélie Linux and contributors. All rights reserved.
* This code is licensed under the AGPL 3.0 license, as noted in the
* LICENSE-code file in the root directory of this repository.
*
@@ -40,16 +40,20 @@ MountDialog::MountDialog(QStringList skipParts, QStringList skipMounts,
for(const auto &disk : wizard->disks) {
if(disk.has_fs()) {
- partitions << QString::fromStdString(disk.node());
+ QString node(QString::fromStdString(disk.node()));
+ if(!skipParts.contains(node)) {
+ partitions << node;
+ }
} else if(disk.has_label()) {
for(const auto &part : disk.partitions()) {
- partitions << QString::fromStdString(part.node());
+ QString node(QString::fromStdString(part.node()));
+ if(!skipParts.contains(node)) {
+ partitions << node;
+ }
}
}
}
- QSet<QString> parts = partitions.toSet().subtract(skipParts.toSet());
- partitions = parts.toList();
partitions.sort();
partList = new QListWidget;