Skip to content

Commit

Permalink
fix windows build (followup c49b5b7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 7, 2015
1 parent fd062ce commit 3dcabfb
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
28 changes: 23 additions & 5 deletions python/core/qgsapplication.sip
Expand Up @@ -102,11 +102,18 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
*/
static QString themeName();

/**
* @brief Set the current UI theme used to style the interface. Use uiThemes() to
* find valid themes to use. Variabels found in variables.qss will be added to the stylesheet
* on load.
* @param themeName The name of the theme.
* @note using an invalid theme name will reset to default
*/
static void setUITheme( const QString &themeName );

/**
* @brief All themes found in the application resources folder
* and ~/.qgis2/themes folder. The path is to the root folder for the theme
* @brief All themes found in ~/.qgis2/themes folder.
* The path is to the root folder for the theme
* @note Valid theme folders must contain a style.qss file.
* @return A hash of theme name and theme path. Valid theme folders contain style.qss
*/
Expand Down Expand Up @@ -202,13 +209,18 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
//! default theme if the active theme does not have the required icon.
static QPixmap getThemePixmap( const QString &theName );


//! Returns the path to user's style.
static QString userStyleV2Path();

//! Returns the path to user's themes folder
static QString userThemesFolder();

//! Returns the path to default style (works as a starting point).
static QString defaultStyleV2Path();

//! Returns the path to default themes folder from install (works as a starting point).
static QString defaultThemesFolder();

//! Returns the path containing qgis_core, qgis_gui, qgispython (and other) libraries
static QString libraryPath();

Expand All @@ -227,12 +239,18 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
//! Alters default svg paths - used by 3rd party apps.
static void setDefaultSvgPaths( const QStringList& pathList );

//! Alters authentication data base directory path - used by 3rd party apps
static void setAuthDbDirPath( const QString& theAuthDbDirPath );

//! loads providers
static void initQgis();

//! initialise qgis.db
static bool createDB( QString* errorMessage = 0 );

//! Create the users theme folder
static bool createThemeFolder( );

//! deletes provider registry and map layer registry
static void exitQgis();

Expand Down Expand Up @@ -269,9 +287,9 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
static void registerOgrDrivers();

/** Converts absolute path to path relative to target */
static QString absolutePathToRelativePath( const QString& apath, const QString& targetPath );
static QString absolutePathToRelativePath( QString apath, QString targetPath );
/** Converts path relative to target to an absolute path */
static QString relativePathToAbsolutePath( const QString& rpath, const QString& targetPath );
static QString relativePathToAbsolutePath( QString rpath, QString targetPath );

/** Indicates whether running from build directory (not installed) */
static bool isRunningFromBuildDir();
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsapplication.cpp
Expand Up @@ -892,7 +892,7 @@ void QgsApplication::registerOgrDrivers()
}
}

QString QgsApplication::absolutePathToRelativePath( const QString& aPath, const QString& targetPath )
QString QgsApplication::absolutePathToRelativePath( QString aPath, QString targetPath )
{
#if defined( Q_OS_WIN )
const Qt::CaseSensitivity cs = Qt::CaseInsensitive;
Expand Down Expand Up @@ -955,7 +955,7 @@ QString QgsApplication::absolutePathToRelativePath( const QString& aPath, const
return aPathElems.join( "/" );
}

QString QgsApplication::relativePathToAbsolutePath( const QString& rpath, const QString& targetPath )
QString QgsApplication::relativePathToAbsolutePath( QString rpath, QString targetPath )
{
// relative path should always start with ./ or ../
if ( !rpath.startsWith( "./" ) && !rpath.startsWith( "../" ) )
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsapplication.h
Expand Up @@ -274,9 +274,9 @@ class CORE_EXPORT QgsApplication : public QApplication
static void registerOgrDrivers();

/** Converts absolute path to path relative to target */
static QString absolutePathToRelativePath( const QString& apath, const QString& targetPath );
static QString absolutePathToRelativePath( QString apath, QString targetPath );
/** Converts path relative to target to an absolute path */
static QString relativePathToAbsolutePath( const QString& rpath, const QString& targetPath );
static QString relativePathToAbsolutePath( QString rpath, QString targetPath );

/** Indicates whether running from build directory (not installed) */
static bool isRunningFromBuildDir() { return ABISYM( mRunningFromBuildDir ); }
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrenderchecker.cpp
Expand Up @@ -244,7 +244,7 @@ bool QgsRenderChecker::runTest( const QString& theTestName,

bool QgsRenderChecker::compareImages( const QString& theTestName,
unsigned int theMismatchCount,
const QString& theRenderedImageFile )
QString theRenderedImageFile )
{
if ( mExpectedImageFile.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrenderchecker.h
Expand Up @@ -128,7 +128,7 @@ class CORE_EXPORT QgsRenderChecker
* @param theRenderedImageFile to optionally override the output filename
* @note: make sure to call setExpectedImage and setRenderedImage first.
*/
bool compareImages( const QString& theTestName, unsigned int theMismatchCount = 0, const QString& theRenderedImageFile = "" );
bool compareImages( const QString& theTestName, unsigned int theMismatchCount = 0, QString theRenderedImageFile = "" );
/** Get a list of all the anomalies. An anomaly is a rendered difference
* file where there is some red pixel content (indicating a render check
* mismatch), but where the output was still acceptible. If the render
Expand Down

0 comments on commit 3dcabfb

Please sign in to comment.