# include "support/qstring_helpers.h"
# include <QDir>
# include <QDesktopServices>
+# include <QStandardPaths>
#endif
using namespace std;
bool doesFileExist(FileName & result, string const & search_dir, string const & name)
{
result = fileSearch(search_dir, name);
- if (!result.empty()) {
- return true;
- }
- return false;
+ return !result.empty();
}
} else if (doesFileExist(lyx_binary, search_dir, "lyx" + string(PROGRAM_SUFFIX) + ext)) {
} else if (doesFileExist(lyx_binary, search_dir, "LyX" + string(PROGRAM_SUFFIX) + ext)){
}
- return !lyx_binary.empty() ? true : false;
+ return !lyx_binary.empty();
}
// This will do nothing if *it is already absolute.
string const exe_dir = makeAbsPath(*it).absFileName();
- FileName const exe_path(addName(exe_dir, exe_name));
- if (exe_path.exists())
- return exe_path;
+ FileName const exe_path2(addName(exe_dir, exe_name));
+ if (exe_path2.exists())
+ return exe_path2;
}
// Didn't find anything.