[Marble-commits] KDE/kdeedu/marble/src/lib
Patrick Spendrin
ps_ml at gmx.de
Tue Dec 15 16:09:32 CET 2009
SVN commit 1062657 by sengels:
remove KDE dependencies from QTONLY library
M +4 -13 CMakeLists.txt
M +2 -15 gps/GpxFileModel.cpp
--- trunk/KDE/kdeedu/marble/src/lib/CMakeLists.txt #1062656:1062657
@@ -204,22 +204,13 @@
# FIXME: cleaner approach of src/lib/MarbleControlBox.* vs. marble.qrc
qt4_add_resources(marblewidget_SRCS libmarble.qrc ../marble.qrc)
-if (QTONLY)
- qt4_wrap_ui(marblewidget_SRCS ${marblewidget_UI})
- qt4_automoc(${marblewidget_SRCS})
-else (QTONLY)
- kde4_add_ui_files(marblewidget_SRCS ${marblewidget_UI})
-endif (QTONLY)
+qt4_wrap_ui(marblewidget_SRCS ${marblewidget_UI})
+qt4_automoc(${marblewidget_SRCS})
# link with release version of Qt libs
-if (QTONLY)
- ADD_LIBRARY(marblewidget SHARED ${marblewidget_SRCS} ${SOURCES_UI_HDRS})
- TARGET_LINK_LIBRARIES (marblewidget ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSVG_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTSCRIPT_LIBRARY} ${QT_QTMAIN_LIBRARY} ${QT_QTWEBKIT_LIBRARY} )
-else (QTONLY)
- KDE4_ADD_LIBRARY(marblewidget SHARED ${marblewidget_SRCS} ${SOURCES_UI_HDRS})
- TARGET_LINK_LIBRARIES (marblewidget ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSVG_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDE4_KDECORE_LIBRARY} ${KDE4_KDEUI_LIBRARY} ${KDE4_KIO_LIBRARY} ${QT_QTMAIN_LIBRARY} ${QT_QTSCRIPT_LIBRARY} ${QT_QTWEBKIT_LIBRARY} )
-endif (QTONLY)
+ADD_LIBRARY(marblewidget SHARED ${marblewidget_SRCS} ${SOURCES_UI_HDRS})
+TARGET_LINK_LIBRARIES (marblewidget ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSVG_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTSCRIPT_LIBRARY} ${QT_QTMAIN_LIBRARY} ${QT_QTWEBKIT_LIBRARY} )
if (APPLE)
#defined in top level makefile
--- trunk/KDE/kdeedu/marble/src/lib/gps/GpxFileModel.cpp #1062656:1062657
@@ -16,18 +16,12 @@
#include <QtCore/Qt>
#include <QtCore/QFile>
#include <QtCore/QVectorIterator>
+#include <QtGui/QFileDialog>
#include "MarbleDebug.h"
#include <config-marble.h>
-#ifdef QTONLY
- #include <QtGui/QFileDialog>
-#else
- #include <KFileDialog>
- #include <KUrl>
-#endif
-
using namespace Marble;
GpxFileModel::GpxFileModel( QObject *parent )
@@ -52,16 +46,9 @@
void GpxFileModel::saveFile()
{
QString fileName;
-#ifdef QTONLY
fileName = QFileDialog::getSaveFileName( 0, tr("Save File"),
QString(),
tr("GpxFile (*.gpx)"));
-#else
- fileName = KFileDialog::getSaveFileName( KUrl(),
- tr("GpxFile (*.gpx)"),
- 0,
- tr("Save File") );
-#endif
QFile file( fileName );
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text ) ) {
@@ -177,6 +164,6 @@
return m_data;
}
- #include "GpxFileModel.moc"
+#include "GpxFileModel.moc"
More information about the Marble-commits
mailing list