[QGIS Commit] r8484 - trunk/qgis/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed May 21 13:22:55 EDT 2008
Author: timlinux
Date: 2008-05-21 13:22:55 -0400 (Wed, 21 May 2008)
New Revision: 8484
Modified:
trunk/qgis/src/core/qgsapplication.cpp
trunk/qgis/src/core/qgsapplication.h
Log:
Added show settings to show application var state when debugging
Modified: trunk/qgis/src/core/qgsapplication.cpp
===================================================================
--- trunk/qgis/src/core/qgsapplication.cpp 2008-05-21 17:20:58 UTC (rev 8483)
+++ trunk/qgis/src/core/qgsapplication.cpp 2008-05-21 17:22:55 UTC (rev 8484)
@@ -51,21 +51,16 @@
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::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 @@
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 @@
"}";
return myStyle;
}
+
+
Modified: trunk/qgis/src/core/qgsapplication.h
===================================================================
--- trunk/qgis/src/core/qgsapplication.h 2008-05-21 17:20:58 UTC (rev 8483)
+++ trunk/qgis/src/core/qgsapplication.h 2008-05-21 17:22:55 UTC (rev 8484)
@@ -113,6 +113,9 @@
* 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;
More information about the QGIS-commit
mailing list