diff --git a/dolphin/src/CMakeLists.txt b/dolphin/src/CMakeLists.txt index 595146d5b5..31e6779a3b 100644 --- a/dolphin/src/CMakeLists.txt +++ b/dolphin/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/dolphin/src/renamedialog.h b/dolphin/src/renamedialog.h index b99fed2917..d6adb6f95a 100644 --- a/dolphin/src/renamedialog.h +++ b/dolphin/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/dolphin/src/tests/CMakeLists.txt b/dolphin/src/tests/CMakeLists.txt index 687d68d9c8..3edf9ca21c 100644 --- a/dolphin/src/tests/CMakeLists.txt +++ b/dolphin/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/dolphin/src/tests/renamedialogtest.cpp b/dolphin/src/tests/renamedialogtest.cpp index 8914bc067b..6404420ffa 100644 --- a/dolphin/src/tests/renamedialogtest.cpp +++ b/dolphin/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"