From 3aa47b789bc9eb9ed68f4eeacffd45bddd1b92e4 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 19 May 2007 08:03:39 +0000 Subject: [PATCH] Make the test link (moving renamedialog to libdolphinprivate since we'll need that feature in the part anyway) svn path=/trunk/KDE/kdebase/apps/; revision=666229 --- src/CMakeLists.txt | 4 ++-- src/renamedialog.h | 5 +++-- src/tests/CMakeLists.txt | 6 ++++-- src/tests/renamedialogtest.cpp | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 595146d5b..31e6779a3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ add_subdirectory( pics ) add_subdirectory( servicemenus ) -#add_subdirectory( tests ) +add_subdirectory( tests ) include_directories( ${CMAKE_SOURCE_DIR}/libkonq ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ) @@ -18,6 +18,7 @@ set(dolphinprivate_LIB_SRCS dolphinsettings.cpp viewproperties.cpp dolphinsortfilterproxymodel.cpp + renamedialog.cpp ) kde4_add_kcfg_files(dolphinprivate_LIB_SRCS @@ -62,7 +63,6 @@ set(dolphin_SRCS main.cpp metadatawidget.cpp pixmapviewer.cpp - renamedialog.cpp settingspagebase.cpp sidebarpage.cpp statusbarspaceinfo.cpp diff --git a/src/renamedialog.h b/src/renamedialog.h index b99fed291..d6adb6f95 100644 --- a/src/renamedialog.h +++ b/src/renamedialog.h @@ -19,11 +19,12 @@ #ifndef RENAMEDIALOG_H #define RENAMEDIALOG_H +#include "libdolphin_export.h" + #include #include - class KLineEdit; /** @@ -45,7 +46,7 @@ class KLineEdit; * } * \endcode */ -class RenameDialog : public KDialog +class LIBDOLPHINPRIVATE_EXPORT RenameDialog : public KDialog { Q_OBJECT diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 687d68d9c..3edf9ca21 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -1,6 +1,6 @@ if(KDE4_BUILD_TESTS) - include_directories( ${CMAKE_SOURCE_DIR}/apps/dolphin/src ) + include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ) # Tests don't need to go into toplevel/bin, they are fine in the current dir. set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) @@ -11,7 +11,9 @@ if(KDE4_BUILD_TESTS) kde4_add_executable(renamedialogtest RUN_UNINSTALLED renamedialogtest.cpp) - target_link_libraries(renamedialogtest dolphin ${QT_QTTEST_LIBRARY}) + target_link_libraries(renamedialogtest dolphinprivate ${QT_QTTEST_LIBRARY}) + + add_test(dolphin-renamedialogtest ${EXECUTABLE_OUTPUT_PATH}/renamedialogtest) ############################################ diff --git a/src/tests/renamedialogtest.cpp b/src/tests/renamedialogtest.cpp index 8914bc067..6404420ff 100644 --- a/src/tests/renamedialogtest.cpp +++ b/src/tests/renamedialogtest.cpp @@ -43,3 +43,5 @@ void RenameDialogTest::testExtensionString() result = RenameDialog::extensionString("Image.tar.1.12.gz"); QCOMPARE(result, QString(".tar.1.12.gz")); } + +#include "renamedialogtest.moc" -- 2.47.3