[Marble-commits] KDE/kdeedu/marble/src
Ariya Hidayat
ariya at kde.org
Thu Jul 30 17:51:15 CEST 2009
SVN commit 1004612 by ariya:
Fix compile with Qt < 4.5.
Reviewed-by: Torsten Rahn
M +5 -1 plugins/render/photo/FlickrParser.cpp
M +3 -1 qtmain.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/render/photo/FlickrParser.cpp #1004611:1004612
@@ -104,7 +104,11 @@
Q_ASSERT( isStartElement()
&& name() == "photo" );
- if( attributes().hasAttribute( "id" ) ) {
+#if QT_VERSION >= 0x040500
+ if( attributes().hasAttribute( "id" ) ) {
+#else
+ if( attributes().value( "id" ).isEmpty() ) {
+#endif
PhotoPluginItem *item = new PhotoPluginItem( m_parent );
item->setId( attributes().value( "id" ).toString() );
item->setServer( attributes().value( "server" ).toString() );
--- trunk/KDE/kdeedu/marble/src/qtmain.cpp #1004611:1004612
@@ -36,13 +36,15 @@
int main(int argc, char *argv[])
{
- // The GraphicsSystem needs to be set before the instantiation of the
+#if QT_VERSION >= 0x040500
+ // The GraphicsSystem needs to be set before the instantiation of the
// QApplication. Therefore we need to parse the current setting
// in this unusual place :-/
QSettings * graphicsSettings = new QSettings("kde.org", "Marble Desktop Globe");
QString graphicsString = graphicsSettings->value("View/graphicsSystem", "native").toString();
delete graphicsSettings;
QApplication::setGraphicsSystem( graphicsString );
+#endif
QApplication app(argc, argv);
// Widget translation
More information about the Marble-commits
mailing list