Skip to content

Commit 72ce2da

Browse files
committed
Use file.startsWith instead of QDir::match to find executable
1 parent df14bb4 commit 72ce2da

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/propelleride/compilers/externalcompiler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ QString ExternalCompiler::getExecutablePath()
4040
{
4141
QDir dir(path);
4242

43-
QString glob = dir.filePath(arg_exe)+"*";
43+
QString glob = dir.filePath(arg_exe);
4444
QStringList entries = dir.entryList(QStringList() << arg_exe+"*",
4545
QDir::Files
4646
| QDir::Executable
@@ -50,7 +50,7 @@ QString ExternalCompiler::getExecutablePath()
5050
{
5151
QString file = dir.filePath(e);
5252

53-
if (QDir::match(glob, file))
53+
if (file.startsWith(glob))
5454
return file;
5555
}
5656
}
@@ -83,6 +83,7 @@ QString ExternalCompiler::build(QString filename,
8383

8484
if (exepath.isEmpty())
8585
{
86+
qCritical() << "Exe path is empty";
8687
handleError(QProcess::FailedToStart);
8788
return QString();
8889
}

src/propelleride/propelleride.pro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ RCC_DIR = .qrc/
1515
}
1616

1717
CONFIG -= debug_and_release app_bundle
18-
CONFIG += debug console
1918

2019
include("../propterm/include.pri")
2120
include("../projectview/include.pri")

0 commit comments

Comments
 (0)