Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #4081
  • Loading branch information
jef-n committed Jul 15, 2011
1 parent e576c9a commit 8ca2898
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 28 deletions.
44 changes: 30 additions & 14 deletions src/app/qgisapp.cpp
Expand Up @@ -1926,36 +1926,52 @@ void QgisApp::about()
{
QApplication::setOverrideCursor( Qt::WaitCursor );
abt = new QgsAbout();
QString versionString = tr( "You are using QGIS version %1 built against code revision %2." )
.arg( QGis::QGIS_VERSION )
.arg( QGis::QGIS_DEV_VERSION );
QString versionString = "<html><body><div align='center'><table width='100%'>";

versionString += tr( "\nGDAL/OGR Version: %1." ).arg( GDAL_RELEASE_NAME );
versionString += "<tr>";
versionString += "<td>" + tr( "QGIS version" ) + "</td><td>" + QGis::QGIS_VERSION + "</td>";
versionString += "<td>" + tr( "QGIS code revision" ) + "</td><td>" + QGis::QGIS_DEV_VERSION + "</td>";

versionString += "</tr><tr>";

versionString += "<td>" + tr( "Compiled against Qt" ) + "</td><td>" + QT_VERSION_STR + "</td>";
versionString += "<td>" + tr( "Running against Qt" ) + "</td><td>" + qVersion() + "</td>";

versionString += "</tr><tr>";

versionString += "<td>" + tr( "GDAL/OGR Version" ) + "</td><td>" + GDAL_RELEASE_NAME + "</td>";
versionString += "<td>" + tr( "GEOS Version" ) + "</td><td>" + GEOS_VERSION + "</td>";

versionString += "</tr><tr>";

versionString += "<td>" + tr( "PostgreSQL Client Version" ) + "</td><td>";
#ifdef HAVE_POSTGRESQL
versionString += tr( "\nPostgreSQL Client Version: %1." ).arg( PG_VERSION );
versionString += PG_VERSION;
#else
versionString += tr( "\nNo PostgreSQL support." );
versionString += tr( "No support." );
#endif
versionString += "</td>";

versionString += "<td>" + tr( "SpatiaLite Version" ) + "</td><td>";
#ifdef HAVE_SPATIALITE
versionString += tr( "\nSpatiaLite Version: %1." ).arg( spatialite_version() );
versionString += spatialite_version();
#else
versionString += tr( "\nNo SpatiaLite support." );
versionString += tr( "No support." );
#endif
versionString += "</td>";

versionString += "</tr><tr>";

versionString += tr( "\nQWT Version: %1." ).arg( QWT_VERSION_STR );
versionString += "<td>" + tr( "QWT Version" ) + "</td><td>" + QWT_VERSION_STR + "</td>";

#ifdef QGISDEBUG
versionString += tr( "\nThis copy of QGIS writes debugging output." );
versionString += "<td colspan=2>" + tr( "This copy of QGIS writes debugging output." ) + "</td>";
#endif

versionString += tr( "\nThis binary was compiled against Qt %1,"
"and is currently running against Qt %2" )
.arg( QT_VERSION_STR )
.arg( qVersion() );
versionString += "</tr></table></div></body></html>";

abt->setVersion( versionString );

QString whatsNew = "<html><body>" ;
whatsNew += "<h3>" + tr( "Version" ) + " " + QString( QGis::QGIS_VERSION ) + "</h3>";
whatsNew += "<h2>" + trUtf8( "What's new in Version 1.7.0 'Wrocław'?" ) + "</h2>";
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsabout.cpp
Expand Up @@ -220,7 +220,9 @@ void QgsAbout::init()

void QgsAbout::setVersion( QString v )
{
lblVersion->setText( v );
txtVersion->setBackgroundRole( QPalette::NoRole );
txtVersion->setAutoFillBackground( true );
txtVersion->setHtml( v );
}

void QgsAbout::setWhatsNew( QString txt )
Expand Down
27 changes: 14 additions & 13 deletions src/ui/qgsabout.ui
Expand Up @@ -67,19 +67,6 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblVersion">
<property name="text">
<string>Version</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer>
<property name="orientation">
Expand Down Expand Up @@ -153,6 +140,19 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QTextEdit" name="txtVersion">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Widget3">
Expand Down Expand Up @@ -264,6 +264,7 @@ p, li { white-space: pre-wrap; }
</tabstops>
<resources>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections>
<connection>
Expand Down

0 comments on commit 8ca2898

Please sign in to comment.