Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GRASS] add extension to t.list on windows, fixes possibly #14241
- Loading branch information
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1543,6 +1543,9 @@ QStringList QgsGrass::grassObjects( const QgsGrassObject& mapsetObject, QgsGrass | |
{ | ||
#if GRASS_VERSION_MAJOR >= 7 | ||
QString cmd = gisbase() + "/scripts/t.list"; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
blazek
Author
Member
|
||
#ifdef Q_OS_WIN | ||
cmd += ".py"; | ||
#endif | ||
QStringList arguments; | ||
|
||
// Running t.list module is quite slow (about 500ms) -> check first if temporal db exists. | ||
|
@@ -1968,7 +1971,10 @@ QProcess *QgsGrass::startModule( const QString& gisdbase, const QString& locati | |
module += QString::number( QgsGrass::versionMajor() ); | ||
} | ||
#ifdef Q_OS_WIN | ||
module += ".exe"; | ||
if ( !module.endsWith( ".exe", Qt::CaseInsensitive ) && !module.endsWith( ".py", Qt::CaseInsensitive ) ) | ||
{ | ||
module += ".exe"; | ||
} | ||
#endif | ||
|
||
// We have to set GISRC file, uff | ||
|
shouldn't this be
QgsGrassModule::findExec( "t.list" )
. That would find thet.list.bat
wrapper inbin
on windows and also thet.list
script inscripts
on other platforms.