Commit 3586400c authored by Patrick Spendrin's avatar Patrick Spendrin
Browse files

remove KDE dependencies from QTONLY library

svn path=/trunk/KDE/kdeedu/marble/; revision=1062657
parent bc722bb2
......@@ -204,22 +204,13 @@ set (marblewidget_UI
# 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
......
......@@ -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 @@ GpxFileModel::~GpxFileModel()
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 @@ QVector<GpxFile*> * GpxFileModel::allFiles()
return m_data;
}
#include "GpxFileModel.moc"
#include "GpxFileModel.moc"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment