summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-27 07:51:59 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-27 07:51:59 (GMT)
commitf8dd006d04b994b2b5719d56a2816f39386911ee (patch)
tree73d80bf7b1048c19695622e09e755e9b62dfc108
parent07d18252637286c56fcf7abc2414adfbb0b1391f (diff)
downloadlibcalendaring-f8dd006d04b994b2b5719d56a2816f39386911ee.tar.gz
get rid of messageboxes and make kabc compile
-rw-r--r--kabc/CMakeLists.txt76
-rw-r--r--kabc/address.cpp1
-rw-r--r--kabc/addresseehelper.cpp1
-rw-r--r--kabc/errorhandler.cpp4
-rw-r--r--kabc/tests/testlock.cpp6
-rw-r--r--kabc/vcardparser/CMakeLists.txt6
6 files changed, 59 insertions, 35 deletions
diff --git a/kabc/CMakeLists.txt b/kabc/CMakeLists.txt
index 387bdb1..9361330 100644
--- a/kabc/CMakeLists.txt
+++ b/kabc/CMakeLists.txt
@@ -1,7 +1,27 @@
project(kabc)
-include_directories( ${KDE4_KIO_INCLUDES} )
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+cmake_minimum_required(VERSION 2.6)
+
+# only available from cmake-2.8.0
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
+ cmake_policy(SET CMP0012 NEW)
+endif()
+
+# only available from cmake-2.8.4
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
+ ${CMAKE_PATCH_VERSION} GREATER 3)
+ cmake_policy(SET CMP0017 NEW)
+endif()
+
+
+
+find_package(Qt4 4.6.0 REQUIRED)
+
+include_directories(${QT_INCLUDES})
+
+# include_directories( ${KDE4_KIO_INCLUDES} )
add_definitions(${QDBUS_DEFINITIONS} -DKDE_DEFAULT_DEBUG_AREA=5700)
add_definitions( -DQT_NO_CAST_FROM_ASCII )
@@ -23,8 +43,8 @@ set(vcards_STAT_SRCS
vcardparser/vcardparser.cpp
)
-add_subdirectory( vcardparser )
-add_subdirectory( tests )
+# add_subdirectory( vcardparser )
+# add_subdirectory( tests )
#add_subdirectory( scripts )
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts)
@@ -54,45 +74,47 @@ set(kabc_LIB_SRCS
errorhandler.cpp
geo.cpp
key.cpp
- ldapdn.cpp
- ldif.cpp
+# ldapdn.cpp
+# ldif.cpp
phonenumber.cpp
picture.cpp
plugin.cpp
secrecy.cpp
sound.cpp
timezone.cpp
- ldifconverter.cpp
+# ldifconverter.cpp
addresseelist.cpp
vcardconverter.cpp
vcardtool.cpp
addresseehelper.cpp
- lock.cpp
- locknull.cpp
+# lock.cpp
+# locknull.cpp
sortmode.cpp
- vcarddrag.cpp
+# vcarddrag.cpp
${vcards_STAT_SRCS}
)
-if (NOT WINCE)
- set(kabc_LIB_SRCS
- ${kabc_LIB_SRCS}
- #disabled due to no QTreeWidget
- emailselectdialog.cpp
- )
-endif()
+QT4_AUTOMOC("${kabc_LIB_SRCS}")
+
+# if (NOT WINCE)
+# set(kabc_LIB_SRCS
+# ${kabc_LIB_SRCS}
+# #disabled due to no QTreeWidget
+# emailselectdialog.cpp
+# )
+# endif()
-kde4_add_library(kabc ${LIBRARY_TYPE} ${kabc_LIB_SRCS})
+add_library(calendaring-kabc ${LIBRARY_TYPE} ${kabc_LIB_SRCS})
-target_link_libraries(kabc ${KDE4_KDEUI_LIBS} ${KDE4_KDECORE_LIBS})
-target_link_libraries(kabc LINK_INTERFACE_LIBRARIES ${KDE4_KDEUI_LIBS})
+target_link_libraries(calendaring-kabc ${KDE4_KDEUI_LIBS} ${KDE4_KDECORE_LIBS})
+target_link_libraries(calendaring-kabc LINK_INTERFACE_LIBRARIES ${KDE4_KDEUI_LIBS})
-set_target_properties(kabc PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
-install(TARGETS kabc EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
+set_target_properties(calendaring-kabc PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
+install(TARGETS calendaring-kabc EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
-install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc )
+# install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc )
install( FILES
kabc_export.h
address.h
@@ -100,14 +122,14 @@ install( FILES
addresseelist.h
contactgroup.h
contactgrouptool.h
- emailselectdialog.h
+# emailselectdialog.h
errorhandler.h
field.h
geo.h
key.h
- ldifconverter.h
- lock.h
- locknull.h
+# ldifconverter.h
+# lock.h
+# locknull.h
phonenumber.h
picture.h
plugin.h
@@ -116,6 +138,6 @@ install( FILES
sound.h
timezone.h
vcardconverter.h
- vcarddrag.h
+# vcarddrag.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kabc COMPONENT Devel
)
diff --git a/kabc/address.cpp b/kabc/address.cpp
index 112c59e..34f5532 100644
--- a/kabc/address.cpp
+++ b/kabc/address.cpp
@@ -622,6 +622,7 @@ QString Address::countryToISO( const QString &cname )
return it.value();
}
+ //FIXME this is likely broken on the server
QString mapfile = KGlobal::dirs()->findResource( "data",
QLatin1String( "kabc/countrytransl.map" ) );
diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp
index d6e1468..725b42c 100644
--- a/kabc/addresseehelper.cpp
+++ b/kabc/addresseehelper.cpp
@@ -114,3 +114,4 @@ bool AddresseeHelper::tradeAsFamilyName() const
return mTradeAsFamilyName;
}
+#include "addresseehelper.moc" \ No newline at end of file
diff --git a/kabc/errorhandler.cpp b/kabc/errorhandler.cpp
index e9019fa..bde91c4 100644
--- a/kabc/errorhandler.cpp
+++ b/kabc/errorhandler.cpp
@@ -24,7 +24,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <kmessagebox.h>
+// #include <kmessagebox.h>
#include <QApplication>
@@ -73,6 +73,6 @@ GuiErrorHandler::~GuiErrorHandler()
void GuiErrorHandler::error( const QString &msg )
{
if ( qApp ) {
- KMessageBox::error( d->mWidget, msg );
+// KMessageBox::error( d->mWidget, msg );
}
}
diff --git a/kabc/tests/testlock.cpp b/kabc/tests/testlock.cpp
index d1881e4..e58ab33 100644
--- a/kabc/tests/testlock.cpp
+++ b/kabc/tests/testlock.cpp
@@ -28,7 +28,7 @@
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kdirwatch.h>
-#include <kmessagebox.h>
+// #include <kmessagebox.h>
#include <kdialog.h>
#include <qtreewidget.h>
@@ -144,7 +144,7 @@ void LockWidget::updateLockView()
void LockWidget::lock()
{
if ( !mLock->lock() ) {
- KMessageBox::sorry( this, mLock->error() );
+// KMessageBox::sorry( this, mLock->error() );
} else {
mStatus->setText( QLatin1String( "Status: Locked" ) );
}
@@ -153,7 +153,7 @@ void LockWidget::lock()
void LockWidget::unlock()
{
if ( !mLock->unlock() ) {
- KMessageBox::sorry( this, mLock->error() );
+// KMessageBox::sorry( this, mLock->error() );
} else {
mStatus->setText( QLatin1String( "Status: Unlocked" ) );
}
diff --git a/kabc/vcardparser/CMakeLists.txt b/kabc/vcardparser/CMakeLists.txt
index 6a27df6..7d0ed2a 100644
--- a/kabc/vcardparser/CMakeLists.txt
+++ b/kabc/vcardparser/CMakeLists.txt
@@ -11,7 +11,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/kabc )
set(testread_SRCS testread.cpp )
-kde4_add_executable(testread TEST ${testread_SRCS})
+add_executable(testread TEST ${testread_SRCS})
target_link_libraries(testread ${KDE4_KDECORE_LIBS} kabc )
@@ -20,7 +20,7 @@ target_link_libraries(testread ${KDE4_KDECORE_LIBS} kabc )
set(testwrite_SRCS testwrite.cpp )
-kde4_add_executable(testwrite TEST ${testwrite_SRCS})
+add_executable(testwrite TEST ${testwrite_SRCS})
target_link_libraries(testwrite ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} kabc )
@@ -29,7 +29,7 @@ target_link_libraries(testwrite ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} kabc )
set(testread2_SRCS testread2.cpp testutils.cpp )
-kde4_add_executable(testread2 TEST ${testread2_SRCS})
+add_executable(testread2 TEST ${testread2_SRCS})
target_link_libraries(testread2 ${KDE4_KDECORE_LIBS} kabc )