From cbac965e47470ce2206bf1752e3bd188ac1fb4cb Mon Sep 17 00:00:00 2001 From: ruglory Date: Sun, 22 Feb 2009 22:30:18 +0000 Subject: [PATCH] qlscribe.h renamed to qlscribe.h.in to be generated from cmake git-svn-id: https://svn.code.sf.net/p/qlscribe/svn/trunk@84 cac9541e-1b8d-4bfa-827e-589bba606050 --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 4 +++- src/qconsoleprintprogress.cpp | 2 ++ src/qlightscribe.cpp | 4 ++-- src/{qlscribe.h => qlscribe.h.in} | 6 ++---- src/qlscribe.pro | 1 - 6 files changed, 12 insertions(+), 8 deletions(-) rename src/{qlscribe.h => qlscribe.h.in} (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index a238e41..c13cc0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) SET( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ) +SET( QLSCRIBE_DBUS_SERVICE org.lightscribe ) +SET( QLSCRIBE_DBUS_MANAGER /org/lightscribe/Manager ) + SUBDIRS( src ) SUBDIRS( resources ) SUBDIRS( lscribed ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5812a67..f378e42 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -35,6 +35,8 @@ SET( QLSCRIBE_MOC_HDRS mainwindow.h qcdscene.h qdialogpixmap.h qdialogroundtext. ADD_DEFINITIONS( -Wall ) +CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/qlscribe.h.in ${CMAKE_CURRENT_BINARY_DIR}/qlscribe.h @ONLY ) + INCLUDE( ${QT_USE_FILE} ) QT4_WRAP_UI( QLSCRIBE_UI_HDRS ${QLSCRIBE_UIS} ) @@ -61,7 +63,7 @@ ENDMACRO(ADD_DBUS_INTERFACE) ADD_DBUS_INTERFACE( QLSCRIBE_DBUS_SRCS lightscribe.xml lightscribe_interface ) -INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ) +INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) ADD_EXECUTABLE( qlscribe ${QLSCRIBE_SRCS} ${QLSCRIBE_MOC_SRCS} ${QLSCRIBE_UI_HDRS} ${QLSCRIBE_DBUS_SRCS} ) diff --git a/src/qconsoleprintprogress.cpp b/src/qconsoleprintprogress.cpp index 530521b..4de70f1 100644 --- a/src/qconsoleprintprogress.cpp +++ b/src/qconsoleprintprogress.cpp @@ -5,6 +5,8 @@ #include +std::ostream &operator<<( std::ostream &os, const QString &str ); + QConsolePrintProgress::QConsolePrintProgress( QLightDrive *drive ) : m_drive( drive ) { diff --git a/src/qlightscribe.cpp b/src/qlightscribe.cpp index da6a0e7..267ff99 100644 --- a/src/qlightscribe.cpp +++ b/src/qlightscribe.cpp @@ -39,7 +39,7 @@ QLightScribe *QLightScribe::instance() } QLightScribe::QLightScribe() - : m_managerPrx( new OrgLightscribePrintManagerInterface( "org.lightscribe", "/org/lightscribe/Manager", QDBusConnection::systemBus(), this ) ) + : m_managerPrx( new OrgLightscribePrintManagerInterface( DBusServiceName, DBusManagerPath, QDBusConnection::systemBus(), this ) ) { } @@ -64,7 +64,7 @@ QList< QLightDrive * > QLightScribe::getDrives() QLightDrive::QLightDrive( QObject *parent, const QString &path, const QString &name ) : QObject( parent ), - m_drivePrx( new OrgLightscribeDriveInterface( "org.lightscribe", path, QDBusConnection::systemBus(), this ) ), + m_drivePrx( new OrgLightscribeDriveInterface( DBusServiceName, path, QDBusConnection::systemBus(), this ) ), m_displayName( name ), m_path( path ) { diff --git a/src/qlscribe.h b/src/qlscribe.h.in similarity index 93% rename from src/qlscribe.h rename to src/qlscribe.h.in index fe78921..d15bd15 100644 --- a/src/qlscribe.h +++ b/src/qlscribe.h.in @@ -21,9 +21,6 @@ #ifndef QLSCRIBE_H #define QLSCRIBE_H -#include -#include - enum LabelMode { /** label the entire disc */ modeFull=0, @@ -62,6 +59,7 @@ enum MediaOptimizationLevel { mediaGeneric }; -std::ostream &operator<<( std::ostream &os, const QString &str ); +const char * const DBusServiceName = "@QLSCRIBE_DBUS_SERVICE@"; +const char * const DBusManagerPath = "@QLSCRIBE_DBUS_MANAGER@"; #endif // QLSCRIBE_H diff --git a/src/qlscribe.pro b/src/qlscribe.pro index 96d9b3d..8920146 100644 --- a/src/qlscribe.pro +++ b/src/qlscribe.pro @@ -35,7 +35,6 @@ HEADERS += mainwindow.h \ qdialogprogress.h \ qlighttextitem.h \ qlightpixmapitem.h \ - qlscribe.h \ qdialogcdproperties.h \ qconsoleprintprogress.h FORMS += qdialogtext.ui \