mirror of
https://github.com/Thracky/GlosSI.git
synced 2024-11-19 03:25:29 +00:00
Add progress dialog when scanning UWP apps
This commit is contained in:
parent
7cff788b87
commit
872589826e
@ -343,7 +343,6 @@ void GloSC::on_pbSearchPath_clicked()
|
|||||||
|
|
||||||
void GloSC::on_pbUWP_clicked()
|
void GloSC::on_pbUWP_clicked()
|
||||||
{
|
{
|
||||||
//TODO: FIXME: Make Async
|
|
||||||
QSettings *settings = new QSettings("HKEY_CLASSES_ROOT", QSettings::NativeFormat);
|
QSettings *settings = new QSettings("HKEY_CLASSES_ROOT", QSettings::NativeFormat);
|
||||||
|
|
||||||
QStringList childs = settings->childGroups();
|
QStringList childs = settings->childGroups();
|
||||||
@ -360,6 +359,9 @@ void GloSC::on_pbUWP_clicked()
|
|||||||
delete settings;
|
delete settings;
|
||||||
|
|
||||||
|
|
||||||
|
QProgressDialog progDialog("Scanning UWP apps...", "Cancel", 0, packages.size(), this);
|
||||||
|
progDialog.setWindowModality(Qt::WindowModal);
|
||||||
|
|
||||||
QList<UWPPair> pairs;
|
QList<UWPPair> pairs;
|
||||||
|
|
||||||
QString AppName;
|
QString AppName;
|
||||||
@ -371,6 +373,13 @@ void GloSC::on_pbUWP_clicked()
|
|||||||
|
|
||||||
for (auto &package : packages)
|
for (auto &package : packages)
|
||||||
{
|
{
|
||||||
|
progDialog.setValue(packages.indexOf(package));
|
||||||
|
|
||||||
|
if (progDialog.wasCanceled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
settings = new QSettings("HKEY_CLASSES_ROOT\\"+package, QSettings::NativeFormat);
|
settings = new QSettings("HKEY_CLASSES_ROOT\\"+package, QSettings::NativeFormat);
|
||||||
|
|
||||||
AppName = settings->value("Application/ApplicationName").toString();
|
AppName = settings->value("Application/ApplicationName").toString();
|
||||||
@ -432,6 +441,7 @@ void GloSC::on_pbUWP_clicked()
|
|||||||
|
|
||||||
uwpPairs = pairs;
|
uwpPairs = pairs;
|
||||||
|
|
||||||
|
progDialog.close();
|
||||||
|
|
||||||
UWPSelectDialog dialog(this);
|
UWPSelectDialog dialog(this);
|
||||||
dialog.setUWPList(uwpPairs);
|
dialog.setUWPList(uwpPairs);
|
||||||
|
@ -31,6 +31,7 @@ limitations under the License.
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include <QGraphicsOpacityEffect>
|
#include <QGraphicsOpacityEffect>
|
||||||
|
#include <QProgressDialog>
|
||||||
|
|
||||||
|
|
||||||
#include "UWPPair.h"
|
#include "UWPPair.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user