[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] /: remove configure option for koproperty (rarely used)
From: Jaroslaw Staniek <staniek () kde ! org>
Date: 2012-12-01 0:17:34
Message-ID: 20121201001734.21687A6091 () git ! kde ! org
[Download RAW message or body]
Git commit 18ac8059539f5b98b6f99a94b0f1c112a43f2456 by Jaroslaw Staniek.
Committed on 01/12/2012 at 01:05.
Pushed by staniek into branch 'master'.
remove configure option for koproperty (rarely used)
M +1 -5 CMakeLists.txt
M +8 -31 libs/koproperty/CMakeLists.txt
M +1 -5 libs/koproperty/DefaultFactory.cpp
M +1 -1 libs/koproperty/Factory.cpp
M +1 -9 libs/koproperty/editors/spinbox.cpp
http://commits.kde.org/calligra/18ac8059539f5b98b6f99a94b0f1c112a43f2456
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ebd181..4c3d7c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -526,14 +526,10 @@ set(KOPAGEAPP_INCLUDES ${TEXTLAYOUT_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/kopageapp \
${CMAKE_SOURCE_DIR}/libs/kopageapp/commands ${CMAKE_BINARY_DIR}/libs/kopageapp )
# koproperty
-SET(KOPROPERTY_TARGETNAME koproperty) # TODO remove when \
we move to independent place
-SET(KOPROPERTY_LIBS ${KOPROPERTY_TARGETNAME}) # TODO remove when \
we move to independent place
-SET(KOPROPERTY_LIB_VERSION ${GENERIC_CALLIGRA_LIB_VERSION}) # TODO remove when \
we move to independent place
-SET(KOPROPERTY_LIB_SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}) # TODO remove when \
we move to independent place
-SET(KOPROPERTY_USE_KOLIBS TRUE) # TODO remove when \
we move to independent place set(KOPROPERTY_INCLUDES ${KOODF_INCLUDES}
${CMAKE_SOURCE_DIR}/libs
${CMAKE_SOURCE_DIR}/libs/widgets)
+set(KOPROPERTY_LIBS koproperty)
# calligradb
# TODO: remove when Predicate lib arrives
diff --git a/libs/koproperty/CMakeLists.txt b/libs/koproperty/CMakeLists.txt
index 36f0781..05e7032 100644
--- a/libs/koproperty/CMakeLists.txt
+++ b/libs/koproperty/CMakeLists.txt
@@ -1,8 +1,3 @@
-# The following variables should be set: KOPROPERTY_TARGETNAME, KOPROPERTY_LIBS, \
KOPROPERTY_LIB_VERSION, KOPROPERTY_LIB_SOVERSION.
-# Set KOPROPERTY_USE_KOLIBS to TRUE if extra features that use Calligra libraries \
should be compiled-in.
-# See calligra/kexi/CMakeLists.txt for example.
-# TODO remove when we move to independent place
-
add_subdirectory( test )
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=44022)
@@ -26,23 +21,14 @@ set(libkopropertyeditors_SRCS
editors/sizepolicyedit.cpp
editors/spinbox.cpp
editors/stringedit.cpp
+ editors/linestyleedit.cpp
# editors/stringlistedit.cpp
# editors/symbolcombo.cpp
# editors/timeedit.cpp
# editors/urledit.cpp
)
-if(KOPROPERTY_USE_KOLIBS) # TODO remove when we move to independent place
- add_definitions(-DKOPROPERTY_USE_KOLIBS)
- include_directories(
- ${KOPROPERTY_INCLUDES}
- )
- list(APPEND libkopropertyeditors_SRCS editors/linestyleedit.cpp)
-else(KOPROPERTY_USE_KOLIBS)
- include_directories(
- ${KDE4_INCLUDES}
- )
-endif(KOPROPERTY_USE_KOLIBS)
+include_directories(${KOPROPERTY_INCLUDES})
########### next target ###############
@@ -57,26 +43,17 @@ set(koproperty_LIB_SRCS
${libkopropertyeditors_SRCS}
)
+kde4_add_library(koproperty SHARED ${koproperty_LIB_SRCS})
+target_link_libraries(koproperty ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} kowidgets)
+target_link_libraries(koproperty LINK_INTERFACE_LIBRARIES ${KDE4_KDEUI_LIBS} \
${KDE4_KIO_LIBS} kowidgets)
-kde4_add_library(${KOPROPERTY_TARGETNAME} SHARED ${koproperty_LIB_SRCS})
-
-set(KOPROPERTY_LINK_LIBS ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
-if(KOPROPERTY_USE_KOLIBS)
- list(APPEND KOPROPERTY_LINK_LIBS kowidgets)
-endif(KOPROPERTY_USE_KOLIBS)
-target_link_libraries(${KOPROPERTY_TARGETNAME} ${KOPROPERTY_LINK_LIBS})
-
-target_link_libraries(${KOPROPERTY_TARGETNAME} LINK_INTERFACE_LIBRARIES \
${KOPROPERTY_LINK_LIBS})
-
-set_target_properties(${KOPROPERTY_TARGETNAME} PROPERTIES VERSION \
${KOPROPERTY_LIB_VERSION} SOVERSION ${KOPROPERTY_LIB_SOVERSION} )
-install(TARGETS ${KOPROPERTY_TARGETNAME} ${INSTALL_TARGETS_DEFAULT_ARGS})
+set_target_properties(koproperty PROPERTIES VERSION ${GENERIC_CALLIGRA_LIB_VERSION} \
SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}) +install(TARGETS koproperty \
${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
-add_definitions(-DKOPROPERTY_APP_DIR="${KOPROPERTY_TARGETNAME}") # for \
KIconLoader::global()->addAppDir();
- # TODO remove \
when we move to independent place
-kde4_install_icons( ${DATA_INSTALL_DIR}/${KOPROPERTY_TARGETNAME}/icons )
+kde4_install_icons(${DATA_INSTALL_DIR}/koproperty/icons)
if(FALSE) # TODO: install when we move to independent place
install( FILES
diff --git a/libs/koproperty/DefaultFactory.cpp b/libs/koproperty/DefaultFactory.cpp
index aacf6d6..976d967 100644
--- a/libs/koproperty/DefaultFactory.cpp
+++ b/libs/koproperty/DefaultFactory.cpp
@@ -38,9 +38,7 @@
#include "editors/sizepolicyedit.h"
#include "editors/spinbox.h"
/*#include "stringlistedit.h"*/
-#ifdef KOPROPERTY_USE_KOLIBS
-# include "editors/linestyleedit.h"
-#endif
+#include "editors/linestyleedit.h"
#include "editors/stringedit.h"
/*#include "symbolcombo.h"
#include "timeedit.h"
@@ -60,9 +58,7 @@ DefaultFactory::DefaultFactory()
addEditor( KoProperty::Double, new DoubleSpinBoxDelegate );
addEditor( KoProperty::Font, new FontDelegate );
addEditor( KoProperty::Int, new IntSpinBoxDelegate );
-#ifdef KOPROPERTY_USE_KOLIBS
addEditor( KoProperty::LineStyle, new LineStyleComboDelegate );
-#endif
//! @todo addEditor( KoProperty::LongLong, new LongLongSpinBoxDelegate );
addEditor( KoProperty::Pixmap, new PixmapDelegate );
addEditor( KoProperty::Point, new PointDelegate );
diff --git a/libs/koproperty/Factory.cpp b/libs/koproperty/Factory.cpp
index 50d8bbd..62e90e1 100644
--- a/libs/koproperty/Factory.cpp
+++ b/libs/koproperty/Factory.cpp
@@ -131,7 +131,7 @@ using namespace KoProperty;
Factory::Factory()
: d( new Private )
{
- KIconLoader::global()->addAppDir(KOPROPERTY_APP_DIR);
+ KIconLoader::global()->addAppDir("koproperty");
}
Factory::~Factory()
diff --git a/libs/koproperty/editors/spinbox.cpp \
b/libs/koproperty/editors/spinbox.cpp index f3c9f27..90236e0 100644
--- a/libs/koproperty/editors/spinbox.cpp
+++ b/libs/koproperty/editors/spinbox.cpp
@@ -37,9 +37,7 @@
#include <QEvent>
#include <QLineEdit>
-#ifdef KOPROPERTY_USE_KOLIBS
-# include <KoUnit.h>
-#endif
+#include <KoUnit.h>
using namespace KoProperty;
@@ -317,22 +315,18 @@ void DoubleSpinBox::resizeEvent( QResizeEvent * event )
void DoubleSpinBox::setValue(double v)
{
-#ifdef KOPROPERTY_USE_KOLIBS
if (!m_unit.isEmpty()) {
KDoubleNumInput::setValue(KoUnit::fromSymbol(m_unit).toUserValue(v));
return;
}
-#endif
KDoubleNumInput::setValue(v);
}
double DoubleSpinBox::value() const
{
-#ifdef KOPROPERTY_USE_KOLIBS
if (!m_unit.isEmpty()) {
return KoUnit::fromSymbol(m_unit).fromUserValue(KDoubleNumInput::value());
}
-#endif
return KDoubleNumInput::value();
}
@@ -543,12 +537,10 @@ QString DoubleSpinBoxDelegate::displayTextForProperty( const \
Property* prop ) co //! @todo precision?
//! @todo rounding using KLocale::formatNumber(const QString &numStr, bool round = \
true,int precision = 2)? QString display;
-#ifdef KOPROPERTY_USE_KOLIBS
if (!unit.isEmpty()) {
return KGlobal::locale()->formatNumber(KoUnit::fromSymbol(unit).toUserValue(prop->value().toDouble())) \
+ QLatin1Char(' ') + unit;
}
-#endif
return KGlobal::locale()->formatNumber(prop->value().toDouble());
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic