[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [audiocd-kio] /: Fix KF5 port.
From: Weng Xuetian <wengxt () gmail ! com>
Date: 2016-10-17 3:18:39
Message-ID: E1bvyRj-0005s3-0E () code ! kde ! org
[Download RAW message or body]
Git commit ed8c2ae2c0f16bf76fea1e0f4eac5121707d52d4 by Weng Xuetian.
Committed on 17/10/2016 at 03:18.
Pushed by xuetianweng into branch 'master'.
Fix KF5 port.
Summary:
check of HAVE_CDDA_IOCTL_DEVICE is wrongly removed during port, restore
it and replace usages of deprecated cmake macro with new one.
Also QUrl::query() and KUrl::query() behaves differently, while \
QUrl::query() will not return '?' in return value.
Test Plan: Test with a real CD localily.
Reviewers: whiting, lesliezhai
Reviewed By: lesliezhai
Differential Revision: https://phabricator.kde.org/D3063
M +12 -0 CMakeLists.txt
M +1 -3 audiocd.cpp
http://commits.kde.org/audiocd-kio/ed8c2ae2c0f16bf76fea1e0f4eac5121707d52d4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5348e7d..5c59a75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,8 @@ include(KDECompilerSettings)
include(KDECMakeSettings)
include(GenerateExportHeader)
include(ECMSetupVersion)
+include(CMakePushCheckState)
+include(CheckStructHasMember)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX AUDIOCDPLUGINS
@@ -42,6 +44,16 @@ ecm_setup_version(${PROJECT_VERSION}
find_package(Cdparanoia REQUIRED)
+cmake_push_check_state()
+set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} \
${CDPARANOIA_INCLUDE_DIR}) +check_struct_has_member("struct cdrom_drive" \
"ioctl_device_name" "cdda_interface.h" CDDA_IOCTL_DEVICE_EXISTS) \
+cmake_pop_check_state() +if(CDDA_IOCTL_DEVICE_EXISTS)
+ set(HAVE_CDDA_IOCTL_DEVICE 1)
+else()
+ set(HAVE_CDDA_IOCTL_DEVICE 0)
+endif()
+
configure_file(config-audiocd.h.cmake \
${CMAKE_CURRENT_BINARY_DIR}/config-audiocd.h)
#############################
diff --git a/audiocd.cpp b/audiocd.cpp
index 4e8cad8..a20e79f 100644
--- a/audiocd.cpp
+++ b/audiocd.cpp
@@ -1006,11 +1006,9 @@ void AudioCDProtocol::parseURLArgs(const QUrl & url)
QString query(QUrl::fromPercentEncoding(url.query().toAscii()));
- if (query.isEmpty() || query[0] != QLatin1Char( '?' ))
+ if (query.isEmpty())
return;
- query = query.mid(1); // Strip leading '?'.
-
const QStringList tokens(query.split(QLatin1Char( '&' \
),QString::SkipEmptyParts));
for (QStringList::ConstIterator it(tokens.constBegin()); it != \
tokens.constEnd(); ++it)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic