Skip to content

Commit

Permalink
unittests: Add PreferencesDialog files
Browse files Browse the repository at this point in the history
The sqlitetablemodel will need to access the color
setting for null fields. This breaks the tests if
the PreferencesDialog files are not linked to the
test executable.
  • Loading branch information
samiraguiar committed Feb 15, 2015
1 parent f3cc983 commit 9fa174f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(SQLB_SRC
../src/csvparser.cpp
../src/grammar/Sqlite3Lexer.cpp
../src/grammar/Sqlite3Parser.cpp
../src/PreferencesDialog.cpp
../src/tests/TestImport.cpp
../src/tests/testsqlobjects.cpp
../src/tests/TestMain.cpp)
Expand All @@ -46,19 +47,27 @@ set(SQLB_HDR
../src/csvparser.h
../src/sqlitetypes.h)

set(SQLB_FORMS
../src/PreferencesDialog.ui)

set(SQLB_MOC_HDR
../src/sqlitedb.h
../src/sqlitetablemodel.h
../src/PreferencesDialog.h
../src/tests/TestImport.h
../src/tests/testsqlobjects.h)

if(NOT USE_QT5)
if(USE_QT5)
QT5_WRAP_CPP(SQLB_MOC ${SQLB_MOC_HDR})
QT5_WRAP_UI(SQLB_FORM_HDR ${SQLB_FORMS})
else()
QT4_WRAP_CPP(SQLB_MOC ${SQLB_MOC_HDR})
QT4_WRAP_UI(SQLB_FORM_HDR ${SQLB_FORMS})
endif()

include_directories("${ANTLR_DIR}" ../src)
include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${ANTLR_DIR}" ../src)

add_executable(${PROJECT_NAME} ${SQLB_MOC} ${SQLB_HDR} ${SQLB_SRC})
add_executable(${PROJECT_NAME} ${SQLB_MOC} ${SQLB_HDR} ${SQLB_SRC} ${SQLB_FORM_HDR})

if(USE_QT5)
qt5_use_modules(${PROJECT_NAME} Test Widgets Gui)
Expand Down

0 comments on commit 9fa174f

Please sign in to comment.