Skip to content

Commit

Permalink
Use file.startsWith instead of QDir::match to find executable
Browse files Browse the repository at this point in the history
  • Loading branch information
bweir committed Jul 17, 2016
1 parent df14bb4 commit 72ce2da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/propelleride/compilers/externalcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ QString ExternalCompiler::getExecutablePath()
{
QDir dir(path);

QString glob = dir.filePath(arg_exe)+"*";
QString glob = dir.filePath(arg_exe);
QStringList entries = dir.entryList(QStringList() << arg_exe+"*",
QDir::Files
| QDir::Executable
Expand All @@ -50,7 +50,7 @@ QString ExternalCompiler::getExecutablePath()
{
QString file = dir.filePath(e);

if (QDir::match(glob, file))
if (file.startsWith(glob))
return file;
}
}
Expand Down Expand Up @@ -83,6 +83,7 @@ QString ExternalCompiler::build(QString filename,

if (exepath.isEmpty())
{
qCritical() << "Exe path is empty";
handleError(QProcess::FailedToStart);
return QString();
}
Expand Down
1 change: 0 additions & 1 deletion src/propelleride/propelleride.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RCC_DIR = .qrc/
}

CONFIG -= debug_and_release app_bundle
CONFIG += debug console

include("../propterm/include.pri")
include("../projectview/include.pri")
Expand Down

0 comments on commit 72ce2da

Please sign in to comment.