Commit f6164b9a authored by David Faure's avatar David Faure
Browse files

thiago is right, unit tests can simply link to the kdeinit library, no need...

thiago is right, unit tests can simply link to the kdeinit library, no need for another intermediate shared lib.

svn path=/trunk/KDE/kdebase/apps/; revision=680927
parent 79c9da67
......@@ -11,7 +11,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/libkonq ${CMAKE_SOURCE_DIR}/workspace/k
########### next target ###############
set(konquerorprivate_SRCS
set(konqueror_KDEINIT_SRCS
konqapplication.cpp
konqguiclients.cpp
konqrun.cpp
......@@ -35,23 +35,17 @@ set(konquerorprivate_SRCS
KonqMainWindowAdaptor.cpp
KonqViewAdaptor.cpp
)
kde4_add_kcfg_files(konquerorprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/konqsettingsxt.kcfgc)
kde4_add_kcfg_files(konqueror_KDEINIT_SRCS konqsettingsxt.kcfgc)
kde4_automoc(${konquerorprivate_SRCS})
qt4_add_dbus_interface(konqueror_KDEINIT_SRCS org.kde.Konqueror.Main.xml konqueror_interface)
qt4_add_dbus_interface(konquerorprivate_SRCS org.kde.Konqueror.Main.xml konqueror_interface)
kde4_automoc(${konqueror_KDEINIT_SRCS})
kde4_add_library(konquerorprivate SHARED ${konquerorprivate_SRCS})
# This lib is private. Don't even think about linking to it!!!
# It *only* exists so that unit tests can be written.
target_link_libraries(konquerorprivate ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KUTILS_LIBS} konq)
set_target_properties(konquerorprivate PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install(TARGETS konquerorprivate DESTINATION ${LIB_INSTALL_DIR})
kde4_add_kdeinit_executable(konqueror ${konqueror_KDEINIT_SRCS} konqmain.cpp)
target_link_libraries(kdeinit_konqueror ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KUTILS_LIBS} konq)
target_link_libraries(konqueror kdeinit_konqueror)
kde4_add_kdeinit_executable( konqueror konqmain.cpp)
target_link_libraries(kdeinit_konqueror konquerorprivate )
target_link_libraries( konqueror kdeinit_konqueror )
install(TARGETS kdeinit_konqueror DESTINATION ${LIB_INSTALL_DIR} )
install(TARGETS konqueror DESTINATION ${BIN_INSTALL_DIR})
......
......@@ -25,7 +25,7 @@
// This is used to know if we are being closed by session management
// or by the user. See KonqMainWindow::~KonqMainWindow.
// Credits to Matthias Ettrich for the idea.
class KONQPRIVATE_EXPORT KonquerorApplication : public KApplication
class KONQ_TESTS_EXPORT KonquerorApplication : public KApplication
{
Q_OBJECT
public:
......
......@@ -63,7 +63,7 @@ private:
/**
* Factory for creating (loading) parts when creating a view.
*/
class KONQPRIVATE_EXPORT KonqFactory
class KONQ_TESTS_EXPORT KonqFactory
{
public:
/**
......
......@@ -85,7 +85,7 @@ namespace KParts {
class KonqExtendedBookmarkOwner;
class KONQPRIVATE_EXPORT KonqMainWindow : public KParts::MainWindow, public KonqFrameContainerBase
class KONQ_TESTS_EXPORT KonqMainWindow : public KParts::MainWindow, public KonqFrameContainerBase
{
Q_OBJECT
Q_PROPERTY( int viewCount READ viewCount )
......
......@@ -27,7 +27,7 @@
class KonqMainWindow;
class KonqView;
class KONQPRIVATE_EXPORT KonqMisc
class KONQ_TESTS_EXPORT KonqMisc
{
public:
/*
......
......@@ -23,27 +23,18 @@
/* needed for KDE_EXPORT and KDE_IMPORT macros */
#include <kdemacros.h>
/* We use _WIN32/_WIN64 instead of Q_OS_WIN so that this header can be used from C files too */
#if defined _WIN32 || defined _WIN64
#ifndef KONQPRIVATE_EXPORT
# if defined(MAKE_KONQUERORPRIVATE_LIB)
#ifndef KONQ_TESTS_EXPORT
# if defined(MAKE_KDEINIT_KONQUEROR_LIB)
/* We are building this library */
# define KONQPRIVATE_EXPORT KDE_EXPORT
# define KONQ_TESTS_EXPORT KDE_EXPORT
# else
/* We are using this library */
# define KONQPRIVATE_EXPORT KDE_IMPORT
# define KONQ_TESTS_EXPORT KDE_IMPORT
# endif
#endif
#else /* UNIX */
#define KONQPRIVATE_EXPORT KDE_EXPORT
#endif
# ifndef KONQPRIVATE_EXPORT_DEPRECATED
# define KONQPRIVATE_EXPORT_DEPRECATED KDE_DEPRECATED KONQPRIVATE_EXPORT
# ifndef KONQ_TESTS_EXPORT_DEPRECATED
# define KONQ_TESTS_EXPORT_DEPRECATED KDE_DEPRECATED KONQ_TESTS_EXPORT
# endif
#endif
......@@ -2,5 +2,5 @@ File=konqueror.kcfg
ClassName=KonqSettings
Singleton=true
Mutators=true
Visibility=KONQPRIVATE_EXPORT
Visibility=KONQ_TESTS_EXPORT
IncludeFiles=konqprivate_export.h
......@@ -48,7 +48,7 @@ namespace KParts
class ReadOnlyPart;
}
class KONQPRIVATE_EXPORT KonqViewManager : public KParts::PartManager
class KONQ_TESTS_EXPORT KonqViewManager : public KParts::PartManager
{
Q_OBJECT
public:
......
......@@ -14,7 +14,7 @@ kde4_automoc(konqviewmgrtest.cpp)
kde4_add_test_executable(konqviewmgrtest konqviewmgrtest.cpp)
target_link_libraries(konqviewmgrtest konquerorprivate ${QT_QTTEST_LIBRARY})
target_link_libraries(konqviewmgrtest kdeinit_konqueror ${QT_QTTEST_LIBRARY})
add_test(konqueror-viewmgrtest ${CMAKE_CURRENT_BINARY_DIR}/konqviewmgrtest)
......
......@@ -30,6 +30,8 @@
QTEST_KDEMAIN_WITH_COMPONENTNAME( ViewMgrTest, GUI, "konqueror" )
#if 0
// could be used to load dummy parts; or to check that the right parts are being loaded
// (and to detect the case where a part is loaded and then replacd with another one for no good reason)
class KonqTestFactory : public KonqAbstractFactory
{
public:
......
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