[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/alkimia/alkquotes/backend
From: Alvaro Soliverez <asoliverez () kde ! org>
Date: 2011-01-22 1:06:25
Message-ID: 20110122010625.AD085AC8B8 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1216220 by asoliverez:
Converted to KApplication
M +8 -3 CMakeLists.txt
M +23 -4 main.cpp
--- trunk/playground/office/alkimia/alkquotes/backend/CMakeLists.txt #1216219:1216220
@@ -1,7 +1,12 @@
cmake_minimum_required( VERSION 2.6 )
PROJECT( quotebackend )
+INCLUDE(KDE4Defaults)
FIND_PACKAGE( Qt4 REQUIRED )
+FIND_PACKAGE( KDE4 REQUIRED )
+
+
+
SET( QT_USE_QTSQL true )
SET( QT_USE_QTDBUS true )
SET( QT_USE_QTNETWORK true )
@@ -38,14 +43,14 @@
SET( backend_service
org.kde.alkimia.quotes.service )
-QT4_WRAP_CPP( backend_MOC_SRCs ${backend_MOC_Headers} )
+#QT4_WRAP_CPP( backend_MOC_SRCs ${backend_MOC_Headers} )
# setup cmake to automatically generate dbus adaptor objects
QT4_ADD_DBUS_ADAPTOR( backend_SRCs org.kde.quotebackend.symbolmanager.xml \
symbolmanager.h SymbolManager ) QT4_ADD_DBUS_ADAPTOR( backend_SRCs \
org.kde.quotebackend.keydatamanager.xml keydatamanager.h KeyDataManager )
-ADD_EXECUTABLE( quotebackend ${backend_SRCs} ${backend_MOC_SRCs} )
-TARGET_LINK_LIBRARIES( quotebackend ${QT_LIBRARIES} )
+KDE4_ADD_EXECUTABLE( quotebackend ${backend_SRCs} ${backend_MOC_SRCs} )
+TARGET_LINK_LIBRARIES( quotebackend ${QT_LIBRARIES} ${KDE4_KDEUI_LIBS} \
${KDE4_KPARTS_LIBS} ) INSTALL( TARGETS quotebackend ${INSTALL_TARGETS_DEFAULT_ARGS} \
)
# install the adaptor xml description files so clients can build against them (is \
--prefix/interfaces the correct place for these?)
--- trunk/playground/office/alkimia/alkquotes/backend/main.cpp #1216219:1216220
@@ -20,8 +20,12 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <KApplication>
+#include <KAboutData>
+#include <KLocale>
+#include <KCmdLineArgs>
-#include <QCoreApplication>
+//#include <QCoreApplication>
#include <QTextCodec>
#include <QtPlugin>
@@ -29,12 +33,27 @@
int main(int argc, char *argv[])
{
- QCoreApplication app(argc, argv);
+ //QCoreApplication app(argc, argv);
// global declarations used by QSettings
- QCoreApplication::setOrganizationName("KDE Finance Apps");
- QCoreApplication::setApplicationName("libalkimia/alkquotes");
+ //QCoreApplication::setOrganizationName("KDE Finance Apps");
+ //QCoreApplication::setApplicationName("libalkimia/alkquotes");
+ KAboutData aboutData("quotebackend", 0, ki18n("Quote Backend"), "0.0.1",
+ ki18n("A backend for querying stock quotes and historical \
data."), + KAboutData::License_GPL,
+ ki18n("Copyright (c) 2010 Brian Cappello")
+ );
+
+ aboutData.addAuthor(ki18n("Brian Cappello"), ki18n("Initial development"), \
"briancappello@gmail.com" ); + aboutData.addAuthor(ki18n("Alvaro Soliverez"), \
ki18n("Lead maintainer"), "asoliverez@kde.org"); +
+ KCmdLineArgs::init(argc, argv, &aboutData);
+
+ KApplication app(false);
+
+
+
Backend *backend = new Backend();
return app.exec();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic