Commit 2cda7ebc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

make it compile without deprecated methods

parent 62060192
...@@ -57,11 +57,13 @@ kde_enable_exceptions() ...@@ -57,11 +57,13 @@ kde_enable_exceptions()
remove_definitions(-DQT_NO_STL) remove_definitions(-DQT_NO_STL)
ecm_setup_version(${KDE_APPLICATIONS_VERSION} VARIABLE_PREFIX KSIRK VERSION_HEADER ksirk_version.h) ecm_setup_version(${KDE_APPLICATIONS_VERSION} VARIABLE_PREFIX KSIRK VERSION_HEADER ksirk_version.h)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
add_subdirectory(ksirk) add_subdirectory(ksirk)
add_subdirectory(ksirkskineditor) add_subdirectory(ksirkskineditor)
add_subdirectory(doc) add_subdirectory(doc)
if (${ECM_VERSION} STRGREATER "5.58.0") if (${ECM_VERSION} STRGREATER "5.58.0")
install(FILES ksirk.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) install(FILES ksirk.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
else() else()
......
...@@ -77,7 +77,7 @@ bool PrivacyList::moveItemUp(int index) ...@@ -77,7 +77,7 @@ bool PrivacyList::moveItemUp(int index)
} }
items_[index].setOrder(items_[index-1].order()); items_[index].setOrder(items_[index-1].order());
items_[index-1].setOrder(order); items_[index-1].setOrder(order);
items_.swap(index,index-1); items_.swapItemsAt(index,index-1);
return true; return true;
} }
else { else {
...@@ -95,7 +95,7 @@ bool PrivacyList::moveItemDown(int index) ...@@ -95,7 +95,7 @@ bool PrivacyList::moveItemDown(int index)
} }
items_[index].setOrder(items_[index+1].order()); items_[index].setOrder(items_[index+1].order());
items_[index+1].setOrder(order); items_[index+1].setOrder(order);
items_.swap(index,index+1); items_.swapItemsAt(index,index+1);
return true; return true;
} }
else { else {
......
...@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) ...@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
if (app.isSessionRestored()) if (app.isSessionRestored())
{ {
RESTORE(Ksirk::KGameWindow); kRestoreMainWindows<Ksirk::KGameWindow>();
} }
else else
{ {
......
...@@ -72,7 +72,7 @@ int main(int argc, char *argv[]) ...@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
if (app.isSessionRestored()) if (app.isSessionRestored())
{ {
RESTORE(KsirkSkinEditor::MainWindow); kRestoreMainWindows<KsirkSkinEditor::MainWindow>();
} }
else else
{ {
......
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