Skip to content
Permalink
Browse files
Added show settings to show application var state when debugging
git-svn-id: http://svn.osgeo.org/qgis/trunk@8484 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 21, 2008
1 parent 4c6626b commit bf60b12
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
@@ -51,21 +51,16 @@ QString QgsApplication::mThemePath;
QgsApplication::QgsApplication(int & argc, char ** argv, bool GUIenabled)
: QApplication(argc, argv, GUIenabled)
{
QgsDebugMsg("\n**********************************");
QgsDebugMsg("\nInitialising QgsApplication...");
#if defined(Q_WS_MACX) || defined(Q_WS_WIN32) || defined(WIN32)
setPrefixPath(applicationDirPath(), true);
#else
QDir myDir(applicationDirPath());
myDir.cdUp();
QString myPrefix = myDir.absolutePath();
QgsDebugMsg("Prefix: " + myPrefix.toLocal8Bit());
setPrefixPath(myPrefix, true);
#endif
QgsDebugMsg("\nPlugin Path:" + mPluginPath);
QgsDebugMsg("\nPkgData Path:" + mPkgDataPath);
QgsDebugMsg("\nTheme Path:" + mThemePath);
QgsDebugMsg("\n**********************************\n");
//for debuggin
showSettings();
}

QgsApplication::~QgsApplication()
@@ -84,7 +79,6 @@ void QgsApplication::setPrefixPath(const QString thePrefixPath, bool useDefaultP
void QgsApplication::setPluginPath(const QString thePluginPath)
{
mPluginPath = thePluginPath;
QgsDebugMsg("\n\n\n\n\n +++++++++++++++++++++++\n plugin path changed\n" + mPluginPath + "\n +++++++++++++++++ \n\n\n\n");
}

void QgsApplication::setPkgDataPath(const QString thePkgDataPath)
@@ -248,6 +242,17 @@ void QgsApplication::exitQgis()
delete QgsProviderRegistry::instance();
}

void QgsApplication::showSettings()
{
qDebug("\n**********************************");
qDebug("QgsApplication state:");
qDebug("Prefix :" + mPrefixPath.toLocal8Bit());
qDebug("Plugin Path :" + mPluginPath.toLocal8Bit());
qDebug("PkgData Path :" + mPkgDataPath.toLocal8Bit());
qDebug("Theme Path :" + mThemePath.toLocal8Bit());
qDebug("**********************************\n");
}

QString QgsApplication::reportStyleSheet()
{
QString myStyle;
@@ -295,3 +300,5 @@ QString QgsApplication::reportStyleSheet()
"}";
return myStyle;
}


@@ -113,6 +113,9 @@ class CORE_EXPORT QgsApplication: public QApplication
* the gradient fills for backgrounds.
*/
static QString reportStyleSheet();
/** Print to stdout the paths used in this application instance.
* useful for debugging mainly.*/
static void showSettings();
private:
static QString mPrefixPath;
static QString mPluginPath;

0 comments on commit bf60b12

Please sign in to comment.