Commit 75bc5aca authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Compile without deprecated method

parent 0c2e88e4
......@@ -4,7 +4,8 @@ cmake_minimum_required(VERSION 2.8.12)
# ECM setup
include(FeatureSummary)
find_package(ECM 5.24.0 NO_MODULE)
set(KF5_DEP_VERSION "5.24.0") # handled by release scripts
find_package(ECM ${KF5_DEP_VERSION} NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
set(CMAKE_MODULE_PATH "${ECM_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
......@@ -17,7 +18,6 @@ include(ECMPackageConfigHelpers)
include(ECMGenerateHeaders)
set(PROJECT_VERSION "16.08.0")
set(KF5_DEP_VERSION "5.24.0") # handled by release scripts
set(REQUIRED_QT_VERSION 5.4.0)
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Network Widgets)
......@@ -46,6 +46,9 @@ endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-musicbrainz.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-musicbrainz.h )
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
add_subdirectory(kcmcddb)
add_subdirectory(libkcddb)
......
......@@ -51,7 +51,7 @@ CDDBConfigWidget::CDDBConfigWidget(QWidget * parent)
QGroupBox* groupBox = new QGroupBox(cacheLocationsParent);
groupBox->setTitle(i18n("Cache Locations"));
QVBoxLayout* gbLayout = new QVBoxLayout(groupBox);
gbLayout->setMargin(0);
gbLayout->setContentsMargins(0, 0, 0, 0);
KEditListWidget* editListWidget = new KEditListWidget(groupBox);
editListWidget->setCustomEditor(urlReq->customEditor());
......@@ -59,7 +59,7 @@ CDDBConfigWidget::CDDBConfigWidget(QWidget * parent)
gbLayout->addWidget(editListWidget);
QHBoxLayout *layout = new QHBoxLayout(cacheLocationsParent);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(groupBox);
connect(needsAuthenticationBox,SIGNAL(toggled(bool)),SLOT(needAuthenticationChanged(bool)));
......
......@@ -154,7 +154,7 @@ class CDInfoDialog::Private
for (unsigned i = 0; i < tracks; ++i) {
QList<QStandardItem *> trackItems = QList<QStandardItem *>();
TrackInfo ti(info.track(i));
QStandardItem *trackNumberItem = new QStandardItem(QString().sprintf("%02d", i + 1));
QStandardItem *trackNumberItem = new QStandardItem(QString::asprintf("%02d", i + 1));
trackNumberItem->setEditable(false);
trackItems << trackNumberItem;
QStandardItem *trackLengthItem = new QStandardItem(framesTime(trackStartFrames[i + 1] - trackStartFrames[i]));
......
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