File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments