Skip to content

Commit 14f4a60

Browse files
committed
Ui: fix poptracker pack detection
1 parent c62a71d commit 14f4a60

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ui/appuipoptracker.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ void AppUi::addPopTrackerMenu()
2222
sDebug() << "Creating Poptracker menu";
2323
popTrackerMenu = menu->addMenu(QIcon(":/img/poptrackericon.png"), "PopTracker");
2424
auto packList = poptrackerScanPack();
25+
sDebug() << "Found : " << packList.size() << " pack";
2526
if (packList.isEmpty())
2627
{
2728
popTrackerMenu->addAction(tr("PopTracker detected but no pack installed"));
@@ -56,13 +57,20 @@ QList<AppUi::PopTrackerPackInfo> AppUi::poptrackerScanPack()
5657
return toret;
5758

5859
QByteArray data = poptrackerProcess.readAllStandardOutput();
60+
qDebug() << data;
5961
QTextStream stream(data);
6062
QString line = stream.readLine();
63+
while (line.indexOf("Installed packs:") == -1)
64+
{
65+
line = stream.readLine();
66+
}
6167
while (!stream.atEnd())
6268
{
6369
line = stream.readLine();
64-
if (line.indexOf("no packs installed") != -1 || line.isEmpty())
65-
break;
70+
if (line.indexOf("no packs installed") != -1)
71+
return toret;
72+
if (line.isEmpty())
73+
continue;
6674
sDebug() << line;
6775
auto pl = line.split(" ");
6876
PopTrackerPackInfo pi;

0 commit comments

Comments
 (0)