- pull in upstream fixes - PhononConfig.cmake: fix/workaround regression'y cmake behaviorepel9
parent
f4fffdf05e
commit
ec92aa1a95
@ -0,0 +1,63 @@
|
||||
From aea95eeec5e75db4b0978ba77f44cb2a5861f1f2 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Mon, 12 Dec 2011 13:44:20 +0100
|
||||
Subject: [PATCH 01/12] only show backend changed notification once per app
|
||||
|
||||
doing it once for all apps is insanely tricky ... plus which one to use?
|
||||
---
|
||||
phonon/factory.cpp | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/phonon/factory.cpp b/phonon/factory.cpp
|
||||
index 770c799..ab27798 100644
|
||||
--- a/phonon/factory.cpp
|
||||
+++ b/phonon/factory.cpp
|
||||
@@ -68,6 +68,9 @@ class FactoryPrivate : public Phonon::Factory::Sender
|
||||
QList<QObject *> objects;
|
||||
QList<MediaNodePrivate *> mediaNodePrivateList;
|
||||
|
||||
+ /// Whether the 'backend changed, please restart' message was shown.
|
||||
+ bool m_backendChangedNotified;
|
||||
+
|
||||
private Q_SLOTS:
|
||||
/**
|
||||
* This is called via DBUS when the user changes the Phonon Backend.
|
||||
@@ -215,10 +218,11 @@ bool FactoryPrivate::createBackend()
|
||||
FactoryPrivate::FactoryPrivate()
|
||||
:
|
||||
#ifndef QT_NO_PHONON_PLATFORMPLUGIN
|
||||
- m_platformPlugin(0),
|
||||
- m_noPlatformPlugin(false),
|
||||
+ m_platformPlugin(0),
|
||||
+ m_noPlatformPlugin(false),
|
||||
#endif //QT_NO_PHONON_PLATFORMPLUGIN
|
||||
- m_backendObject(0)
|
||||
+ m_backendObject(0),
|
||||
+ m_backendChangedNotified(false)
|
||||
{
|
||||
// Add the post routine to make sure that all other global statics (especially the ones from Qt)
|
||||
// are still available. If the FactoryPrivate dtor is called too late many bad things can happen
|
||||
@@ -303,16 +307,16 @@ void Factory::deregisterFrontendObject(MediaNodePrivate *bp)
|
||||
#ifndef PHONON_NO_DBUS
|
||||
void FactoryPrivate::phononBackendChanged()
|
||||
{
|
||||
-#ifdef __GNUC__
|
||||
-#warning TODO hyperspeed: the message box only ought to be shown once and not for \
|
||||
- every backend switch
|
||||
-#endif
|
||||
+ if (m_backendChangedNotified)
|
||||
+ return;
|
||||
+
|
||||
QMessageBox::information(qApp->activeWindow(),
|
||||
tr("Restart Application"),
|
||||
tr("You changed the backend of the Phonon multimedia system.\n\n"
|
||||
"To apply this change you will need to"
|
||||
" restart '%1'.").arg(qAppName()));
|
||||
emit backendChanged();
|
||||
+ m_backendChangedNotified = true;
|
||||
}
|
||||
#endif //PHONON_NO_DBUS
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From c07c522992f1308c8bac9994b9e312728d513835 Mon Sep 17 00:00:00 2001
|
||||
From: Raymond Wooninck <tittiatcoke@gmail.com>
|
||||
Date: Mon, 19 Dec 2011 14:28:37 +0100
|
||||
Subject: [PATCH 02/12] Change a foreach to Q_FOREACH to prevent compile errors
|
||||
with other packages. Discussed with apachelogger
|
||||
|
||||
---
|
||||
phonon/objectdescription.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/phonon/objectdescription.h b/phonon/objectdescription.h
|
||||
index ac13276..025ee60 100644
|
||||
--- a/phonon/objectdescription.h
|
||||
+++ b/phonon/objectdescription.h
|
||||
@@ -269,7 +269,7 @@ QDebug operator<<(QDebug dbg, const ObjectDescription<T> &d)
|
||||
{
|
||||
dbg.nospace() << "\n{\n";
|
||||
dbg.nospace() << " index: " << d.index() << "\n";
|
||||
- foreach (const QByteArray &propertyName, d.propertyNames()) {
|
||||
+ Q_FOREACH (const QByteArray &propertyName, d.propertyNames()) {
|
||||
dbg.nospace() << " " << propertyName << ": " <<
|
||||
d.property(propertyName).toString() << "\n";
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 0a5dd6c2269ec9075e6aa79a88d4377c96cf1d3d Mon Sep 17 00:00:00 2001
|
||||
From: Rex Dieter <rdieter@fedoraproject.org>
|
||||
Date: Fri, 6 Jan 2012 08:48:56 -0500
|
||||
Subject: [PATCH 03/12] Upstream fedora patch that fixes platform plugin
|
||||
loading that is outside of a kde session
|
||||
|
||||
---
|
||||
phonon/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/phonon/CMakeLists.txt b/phonon/CMakeLists.txt
|
||||
index 152163c..6a0ed56 100644
|
||||
--- a/phonon/CMakeLists.txt
|
||||
+++ b/phonon/CMakeLists.txt
|
||||
@@ -78,7 +78,7 @@ if (PHONON_NO_PLATFORMPLUGIN)
|
||||
add_definitions(-DQT_NO_PHONON_PLATFORMPLUGIN)
|
||||
endif (PHONON_NO_PLATFORMPLUGIN)
|
||||
|
||||
-add_definitions(-DPHONON_LIBRARY_PATH="${PLUGIN_INSTALL_DIR}/plugins")
|
||||
+add_definitions(-DPHONON_LIBRARY_PATH="${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}/plugins")
|
||||
|
||||
automoc4_add_library(phonon SHARED ${phonon_LIB_SRCS})
|
||||
target_link_libraries(phonon ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,70 @@
|
||||
From f87d0af4ccd7af44c10c52bafa48050ea89af6e2 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Wed, 12 Sep 2012 17:13:07 +0200
|
||||
Subject: [PATCH 04/12] doc: update aliases with latest one from apidox
|
||||
|
||||
---
|
||||
doc/Doxyfile.cmake.in | 47 +++++++++++++++++++++++------------------------
|
||||
1 file changed, 23 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/doc/Doxyfile.cmake.in b/doc/Doxyfile.cmake.in
|
||||
index e6c11f2..3d3788c 100644
|
||||
--- a/doc/Doxyfile.cmake.in
|
||||
+++ b/doc/Doxyfile.cmake.in
|
||||
@@ -202,30 +202,29 @@ TAB_SIZE = 8
|
||||
# will result in a user-defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
-ALIASES = \
|
||||
- "intern=\par<b>Internal use only.</b>" \
|
||||
- "reimp=\par<b>Reimplemented from superclass.</b>" \
|
||||
- "obsolete=@deprecated" \
|
||||
- "feature=\xrefitem features \"Feature(s)\" \"Features\"" \
|
||||
- "maintainer=\xrefitem maintainers \"Maintainer(s)\" \"Maintainers\"" \
|
||||
- "unmaintained=\xrefitem unmaintained \"Unmaintained\" \"Unmaintained\"" \
|
||||
- "requirement=\xrefitem requirements \"Requirement(s)\" \"Requirements\"" \
|
||||
- "faq=\xrefitem FAQ \"F.A.Q.\" \"F.A.Q.\"" \
|
||||
- "authors=\xrefitem authors \"Author(s)\" \"Authors\"" \
|
||||
- "maintainers=\xrefitem maintainers \"Maintainer(s)\" \"Maintainers\"" \
|
||||
- "port4=\xrefitem port4 \"KDE 4 Porting Guide\" \"KDE 4 Porting Guide\"" \
|
||||
- "glossary=\xrefitem glossary \"KDE 4 Glossary\" \"KDE 4 Glossary\"" \
|
||||
- "acronym=\b "\
|
||||
- "licenses=\xrefitem licenses \"License(s)\" \"Licenses\"" \
|
||||
- "short=@brief "\
|
||||
- "FIXME=\xrefitem fixme \"Fixme\" \"Fixme\"" \
|
||||
- "bc=\xrefitem bc \"Binary Compatible\" \"Binary Compatible\"" \
|
||||
- "artistic=<a href=\"http://www.opensource.org/licenses/artistic-license.php\">Artistic</a>" \
|
||||
- "bsd=<a href=\"http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5\">BSD</a>" \
|
||||
- "x11=<a href=\"http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3\">X11</a>" \
|
||||
- "gpl=<a href=\"http://www.fsf.org/licensing/licenses/gpl.html#SEC1\">GPL</a>" \
|
||||
- "lgpl=<a href=\"http://www.fsf.org/licensing/licenses/lgpl.html#SEC1\">LGPL</a>" \
|
||||
- "qpl=<a href=\"http://www.trolltech.com/products/qt/licenses\">QPL</a>"
|
||||
+ALIASES = "intern=\par<b>Internal use only.</b>" \
|
||||
+ "reimp=\par<b>Reimplemented from superclass.</b>" \
|
||||
+ "obsolete=@deprecated" \
|
||||
+ "feature=\xrefitem features \"Feature(s)\" \"Features\"" \
|
||||
+ "unmaintained=\xrefitem unmaintained \"Unmaintained\" \"Unmaintained\"" \
|
||||
+ "requirement=\xrefitem requirements \"Requirement(s)\" \"Requirements\"" \
|
||||
+ "faq=\xrefitem FAQ \"F.A.Q.\" \"F.A.Q.\"" \
|
||||
+ "authors=\xrefitem authors \"Author(s)\" \"Authors\"" \
|
||||
+ "maintainers=\xrefitem maintainers \"Maintainer(s)\" \"Maintainers\"" \
|
||||
+ "port4=\xrefitem port4 \"KDE 4 Porting Guide\" \"KDE 4 Porting Guide\"" \
|
||||
+ "glossary=\xrefitem glossary \"KDE 4 Glossary\" \"KDE 4 Glossary\"" \
|
||||
+ "acronym=\b " \
|
||||
+ "licenses=\xrefitem licenses \"License(s)\" \"Licenses\"" \
|
||||
+ "FIXME=\xrefitem fixme \"Fixme\" \"Fixme\"" \
|
||||
+ "bc=\xrefitem bc \"Binary Compatible\" \"Binary Compatible\"" \
|
||||
+ "threadsafe=\xrefitem threadsafe \"Threadsafe\" \"Threadsafe\"" \
|
||||
+ "artistic=<a href=\"http://www.opensource.org/licenses/artistic-license.php\">Artistic</a>" \
|
||||
+ "bsd=<a href=\"http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5\">BSD</a>" \
|
||||
+ "x11=<a href=\"http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3\">X11</a>" \
|
||||
+ "gpl=<a href=\"http://www.gnu.org/licenses/old-licenses/gpl-2.0.html#SEC1\">GPLv2</a>" \
|
||||
+ "lgpl=<a href=\"http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC1\">LGPLv2</a>" \
|
||||
+ "mit=<a href=\"http://www.opensource.org/licenses/mit-license.php\">MIT</a>" \
|
||||
+ "qpl=<a href=\"http://doc.trolltech.com/3.0/license.html\">QPL</a>"
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
|
||||
# sources only. Doxygen will then generate output that is more tailored for C.
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,53 @@
|
||||
From a40746b5f381a8417dc0d9ea9c3f299e1da88631 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Wed, 12 Sep 2012 17:20:52 +0200
|
||||
Subject: [PATCH 05/12] docs: remove reference to xine and update apidox
|
||||
settings
|
||||
|
||||
---
|
||||
Mainpage.dox | 14 ++++++--------
|
||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Mainpage.dox b/Mainpage.dox
|
||||
index 82b96ad..a5df2f5 100644
|
||||
--- a/Mainpage.dox
|
||||
+++ b/Mainpage.dox
|
||||
@@ -16,8 +16,7 @@ almost certainly the right choice for you. It provides an API that any Qt
|
||||
developer will be comfortable with, and uses the native multimedia frameworks
|
||||
on Windows and MacOS. On UNIX systems, where there is no one standard
|
||||
multimedia system, it offers <a href="http://www.gstreamer.net/">GStreamer</a>
|
||||
-and <a href="http://xinehq.de/">Xine</a> backends, and more (such as
|
||||
-<a href="http://www.videolan.org/">VLC</a>) are available from third parties.
|
||||
+and <a href="http://www.videolan.org/">VLC</a> backends.
|
||||
|
||||
However, Phonon is not aimed at professional audio applications (in the style of
|
||||
<a href="http://audacity.sourceforge.net/">Audacity</a>, say). For these applications,
|
||||
@@ -35,7 +34,6 @@ Nokia Corporation and/or its subsidiary(-ies)
|
||||
|
||||
@maintainers
|
||||
Harald Sitter \<sitter@kde.org\>
|
||||
-Martin Sandsmark \<martin.sandsmark@kde.org\>
|
||||
|
||||
@licenses
|
||||
Libraries: @lgpl<br>
|
||||
@@ -66,12 +64,12 @@ If you want more immediate help, try the \#phonon IRC channel on Freenode.
|
||||
|
||||
*/
|
||||
|
||||
-// DOXYGEN_VERSION=4.5.55
|
||||
+// DOXYGEN_VERSION=4.7.0
|
||||
// DOXYGEN_NAME=Phonon
|
||||
// DOXYGEN_ENABLE=YES
|
||||
-// DOXYGEN_SET_INPUT = @topdir@/phonon/ @topdir@/phonon/Mainpage.dox
|
||||
-// DOXYGEN_SET_FILE_PATTERNS = *.h *.dox */phononnamespace.h.in
|
||||
-// ignore backend docs
|
||||
-// DOXYGEN_SET_EXCLUDE_PATTERNS = *interface.h */phonon/examples/* */tests/* *_p.h */experimental/videocapturedevice/* */phonon/backend*
|
||||
+// DOXYGEN_SET_INPUT = @topdir@/phonon/
|
||||
+// DOXYGEN_SET_EXCLUDE = @topdir@/phonon/backend/ @topdir@/phonon/experimental/
|
||||
+// DOXYGEN_SET_FILE_PATTERNS = *.h *.dox
|
||||
+// DOXYGEN_SET_EXCLUDE_PATTERNS = *interface.h *_p.h
|
||||
|
||||
// vim:ts=4:sw=4:expandtab:filetype=doxygen
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 2b0f5bd5a48936b9dbb3bf4679cf95a4841ac3c7 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Wed, 12 Sep 2012 17:21:24 +0200
|
||||
Subject: [PATCH 06/12] docs: exclude phonon/backend and phonon/experimental
|
||||
|
||||
---
|
||||
doc/CMakeLists.txt | 7 +++++++
|
||||
doc/Doxyfile.cmake.in | 2 +-
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
|
||||
index 24476d6..692442a 100644
|
||||
--- a/doc/CMakeLists.txt
|
||||
+++ b/doc/CMakeLists.txt
|
||||
@@ -10,6 +10,13 @@ set(PHONON_DOXYGEN_SOURCE_DIR
|
||||
)
|
||||
string(REGEX REPLACE ";" " " PHONON_DOXYGEN_SOURCE_DIR "${PHONON_DOXYGEN_SOURCE_DIR}")
|
||||
|
||||
+set(PHONON_DOXYGEN_EXCLUDE
|
||||
+ ${PHONON_SOURCE_DIR}/phonon/backend
|
||||
+ ${PHONON_SOURCE_DIR}/phonon/experimental
|
||||
+)
|
||||
+string(REGEX REPLACE ";" " " PHONON_DOXYGEN_EXCLUDE "${PHONON_DOXYGEN_EXCLUDE}")
|
||||
+
|
||||
+
|
||||
configure_file(Doxyfile.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
|
||||
add_custom_target("html" ALL
|
||||
diff --git a/doc/Doxyfile.cmake.in b/doc/Doxyfile.cmake.in
|
||||
index 3d3788c..faaa943 100644
|
||||
--- a/doc/Doxyfile.cmake.in
|
||||
+++ b/doc/Doxyfile.cmake.in
|
||||
@@ -702,7 +702,7 @@ RECURSIVE = YES
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
-EXCLUDE =
|
||||
+EXCLUDE = @PHONON_DOXYGEN_EXCLUDE@
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,57 @@
|
||||
From 18223bd2f2dcc354127dd9cffc5a80f5c4cdadeb Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Wed, 12 Sep 2012 18:10:13 +0200
|
||||
Subject: [PATCH 07/12] remove automoc4 dependency
|
||||
|
||||
Starting with CMake 2.8.6 there is an automoc builtin. Whenever using
|
||||
CMake >= 2.8.6 we therefore activate the builtin and provide a
|
||||
compatibility macro for automoc4_add_library. When using < 2.8.6 we
|
||||
continue to look for automoc4 and fail if unable to find it.
|
||||
|
||||
This makes the automoc4 dep unnecessary when building with a sufficiently
|
||||
new CMake version. Horray!
|
||||
---
|
||||
cmake/FindPhononInternal.cmake | 27 +++++++++++++++++++--------
|
||||
1 file changed, 19 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindPhononInternal.cmake b/cmake/FindPhononInternal.cmake
|
||||
index 2bad949..1e9edb0 100644
|
||||
--- a/cmake/FindPhononInternal.cmake
|
||||
+++ b/cmake/FindPhononInternal.cmake
|
||||
@@ -74,14 +74,25 @@ endif(NOT QT_QTDBUS_FOUND)
|
||||
|
||||
# - Automoc
|
||||
|
||||
-find_package(Automoc4 REQUIRED)
|
||||
-if (NOT AUTOMOC4_VERSION)
|
||||
- set(AUTOMOC4_VERSION "0.9.83")
|
||||
-endif (NOT AUTOMOC4_VERSION)
|
||||
-macro_ensure_version("0.9.86" "${AUTOMOC4_VERSION}" _automoc4_version_ok)
|
||||
-if (NOT _automoc4_version_ok)
|
||||
- message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.86")
|
||||
-endif (NOT _automoc4_version_ok)
|
||||
+# Starting with CMake 2.8.6 there is a builtin to replace automoc4, use that when possible.
|
||||
+if(CMAKE_VERSION VERSION_GREATER 2.8.5)
|
||||
+ message(STATUS "Using CMake automoc builtin")
|
||||
+ set(CMAKE_AUTOMOC TRUE)
|
||||
+ # Compatiblity Macro
|
||||
+ macro(AUTOMOC4_ADD_LIBRARY _target_NAME _add_executable_param)
|
||||
+ add_library(${_target_NAME} ${_add_executable_param} ${ARGN})
|
||||
+ endmacro(AUTOMOC4_ADD_LIBRARY)
|
||||
+else(CMAKE_VERSION VERSION_GREATER 2.8.5)
|
||||
+ message(STATUS "Can not use CMake automoc builtin, trying to find automoc4")
|
||||
+ find_package(Automoc4 REQUIRED)
|
||||
+ if (NOT AUTOMOC4_VERSION)
|
||||
+ set(AUTOMOC4_VERSION "0.9.83")
|
||||
+ endif (NOT AUTOMOC4_VERSION)
|
||||
+ macro_ensure_version("0.9.86" "${AUTOMOC4_VERSION}" _automoc4_version_ok)
|
||||
+ if (NOT _automoc4_version_ok)
|
||||
+ message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.86")
|
||||
+ endif (NOT _automoc4_version_ok)
|
||||
+endif(CMAKE_VERSION VERSION_GREATER 2.8.5)
|
||||
|
||||
# restore the original CMAKE_MODULE_PATH
|
||||
set(CMAKE_MODULE_PATH ${_phonon_cmake_module_path_back})
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 9f5336c4e5ad6175114ecf1495d60f63003b2216 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Wed, 12 Sep 2012 18:10:28 +0200
|
||||
Subject: [PATCH 08/12] not finding qtdbus is really a proper warning, not a
|
||||
status message
|
||||
|
||||
---
|
||||
cmake/FindPhononInternal.cmake | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindPhononInternal.cmake b/cmake/FindPhononInternal.cmake
|
||||
index 1e9edb0..de7f6ea 100644
|
||||
--- a/cmake/FindPhononInternal.cmake
|
||||
+++ b/cmake/FindPhononInternal.cmake
|
||||
@@ -68,9 +68,9 @@ endif (${QT_MIN_VERSION} VERSION_LESS "4.6.0")
|
||||
find_package(Qt4 ${_REQ_STRING_KDE4})
|
||||
|
||||
# TODO: do we want this here?
|
||||
-if (NOT QT_QTDBUS_FOUND)
|
||||
- message(STATUS "Warning: Building without DBus support as QtDBus was not found.")
|
||||
-endif(NOT QT_QTDBUS_FOUND)
|
||||
+if (QT_QTDBUS_FOUND)
|
||||
+ message(WARNING "Building without DBus support as QtDBus was not found.")
|
||||
+endif(QT_QTDBUS_FOUND)
|
||||
|
||||
# - Automoc
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 7d1008a5765b4c66e8a2e8c38aac8cb06eb09eb8 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Wed, 12 Sep 2012 18:35:38 +0200
|
||||
Subject: [PATCH 09/12] fix inverted if
|
||||
|
||||
---
|
||||
cmake/FindPhononInternal.cmake | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindPhononInternal.cmake b/cmake/FindPhononInternal.cmake
|
||||
index de7f6ea..d629fb3 100644
|
||||
--- a/cmake/FindPhononInternal.cmake
|
||||
+++ b/cmake/FindPhononInternal.cmake
|
||||
@@ -68,9 +68,9 @@ endif (${QT_MIN_VERSION} VERSION_LESS "4.6.0")
|
||||
find_package(Qt4 ${_REQ_STRING_KDE4})
|
||||
|
||||
# TODO: do we want this here?
|
||||
-if (QT_QTDBUS_FOUND)
|
||||
+if (NOT QT_QTDBUS_FOUND)
|
||||
message(WARNING "Building without DBus support as QtDBus was not found.")
|
||||
-endif(QT_QTDBUS_FOUND)
|
||||
+endif(NOT QT_QTDBUS_FOUND)
|
||||
|
||||
# - Automoc
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 7a4911590864f138550b63ff45dae65d92843bd6 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Mon, 17 Sep 2012 11:48:08 +0200
|
||||
Subject: [PATCH 10/12] manually set cmake_install_prefix on the
|
||||
icon_install_dir
|
||||
|
||||
when doing a cache update we apparently need the full path, which may
|
||||
be limited to this case, not quite sure.
|
||||
at any rate our code is vastly different from kdelibs' so a resync is
|
||||
out of the question for phonon4.
|
||||
|
||||
would be good if one of the windows guys were to test this change.
|
||||
|
||||
BUG: 294505
|
||||
FIXED-IN: 4.6.1
|
||||
---
|
||||
cmake/PhononMacros.cmake | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/PhononMacros.cmake b/cmake/PhononMacros.cmake
|
||||
index fc10180..9870a2c 100644
|
||||
--- a/cmake/PhononMacros.cmake
|
||||
+++ b/cmake/PhononMacros.cmake
|
||||
@@ -96,8 +96,8 @@ macro (PHONON_UPDATE_ICONCACHE)
|
||||
install(CODE "
|
||||
set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
|
||||
if (NOT DESTDIR_VALUE)
|
||||
- file(WRITE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\" \"update\")
|
||||
- file(REMOVE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\")
|
||||
+ file(WRITE \"${CMAKE_INSTALL_PREFIX}/${ICON_INSTALL_DIR}/hicolor/temp.txt\" \"update\")
|
||||
+ file(REMOVE \"${CMAKE_INSTALL_PREFIX}/${ICON_INSTALL_DIR}/hicolor/temp.txt\")
|
||||
endif (NOT DESTDIR_VALUE)
|
||||
")
|
||||
endmacro (PHONON_UPDATE_ICONCACHE)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From a8c431494d2a6f3785c132f14d00d38ea0e5b328 Mon Sep 17 00:00:00 2001
|
||||
From: Oswald Buddenhagen <ossi@kde.org>
|
||||
Date: Sat, 27 Oct 2012 09:58:16 +0200
|
||||
Subject: [PATCH 11/12] remove unnecessary if() statement
|
||||
|
||||
as it happens, this works around a qmake breakage relating to parsing if()
|
||||
|
||||
BUG: 295037
|
||||
FIXED-IN: 4.6.1
|
||||
---
|
||||
qt_phonon.pri | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/qt_phonon.pri b/qt_phonon.pri
|
||||
index 08de2e2..daf824f 100644
|
||||
--- a/qt_phonon.pri
|
||||
+++ b/qt_phonon.pri
|
||||
@@ -3,6 +3,6 @@
|
||||
# the next build of Qt. So pretend we're not there in this case.
|
||||
# This file is loaded by qt_config.prf, before .qmake.cache has been loaded.
|
||||
# Consequently, we have to do some stunts to get values out of the cache.
|
||||
-if(!exists($$_QMAKE_CACHE_)| \
|
||||
- !contains($$list($$fromfile($$_QMAKE_CACHE_, CONFIG)), QTDIR_build)): \
|
||||
+!exists($$_QMAKE_CACHE_)| \
|
||||
+ !contains($$list($$fromfile($$_QMAKE_CACHE_, CONFIG)), QTDIR_build): \
|
||||
QT_CONFIG += phonon
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,754 @@
|
||||
From f88f1b13a5319ec80999de00095ef289a55d6fbb Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Sun, 27 Jan 2013 01:47:11 +0100
|
||||
Subject: [PATCH 12/12] remove testing scripts and move design docs into proper
|
||||
folder
|
||||
|
||||
---
|
||||
doc/DESIGN/stream-thoughts | 72 ++++++
|
||||
phonon/extractmethodcalls.rb | 527 -----------------------------------------
|
||||
phonon/preprocessandextract.sh | 39 ---
|
||||
phonon/stream-thoughts | 72 ------
|
||||
4 files changed, 72 insertions(+), 638 deletions(-)
|
||||
create mode 100644 doc/DESIGN/stream-thoughts
|
||||
delete mode 100755 phonon/extractmethodcalls.rb
|
||||
delete mode 100755 phonon/preprocessandextract.sh
|
||||
delete mode 100644 phonon/stream-thoughts
|
||||
|
||||
diff --git a/doc/DESIGN/stream-thoughts b/doc/DESIGN/stream-thoughts
|
||||
new file mode 100644
|
||||
index 0000000..5fb6711
|
||||
--- /dev/null
|
||||
+++ b/doc/DESIGN/stream-thoughts
|
||||
@@ -0,0 +1,72 @@
|
||||
+there are two different kind of streams: 1. media files 2. live radio/television
|
||||
+
|
||||
+The difference cannot reliably be determined by the backend so the application has to tell the
|
||||
+frontend.
|
||||
+
|
||||
+This is the expected behaviour:
|
||||
+1. media files
|
||||
+==============
|
||||
+function | prev. state | action | new state
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+ctor | | | Loading
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+setUrl | Loading | refill buffers | Loading
|
||||
+ | Stopped | refill buffers | Loading
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+play | Loading | continue buffering | Buffering
|
||||
+ | Stopped | start playing | Playing
|
||||
+ | Buffering | continue buffering | Buffering
|
||||
+ | Playing | | Playing
|
||||
+ | Paused | continue playback | Playing
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+pause | Loading | | Loading
|
||||
+ | Stopped | | Stopped
|
||||
+ | Buffering | continue buffering | Paused
|
||||
+ | Playing | pause output and fill buffers to the max | Paused
|
||||
+ | Paused | | Paused
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+stop | Loading | | Loading
|
||||
+ | Stopped | | Stopped
|
||||
+ | Buffering | restart buffering from the beginning of the file | Loading
|
||||
+ | Playing | stop output and refill buffers from the beginning of the file | Loading
|
||||
+ | Paused | restart buffering from the beginning of the file | Loading
|
||||
+
|
||||
+events
|
||||
+function | prev. state | event | new state
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+ | Buffering | when the buffers are filled start playing | Playing
|
||||
+ | Loading | when buffers are filled | Stopped
|
||||
+
|
||||
+
|
||||
+
|
||||
+2. live stream
|
||||
+==============
|
||||
+function | prev. state | action | new state
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+ctor | | | Loading
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+setUrl | Loading | | Stopped
|
||||
+ | Stopped | | Stopped
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+play | Loading | | Error
|
||||
+ | Stopped | start buffering | Buffering
|
||||
+ | Buffering | continue buffering | Buffering
|
||||
+ | Playing | | Playing
|
||||
+ | Paused | continue playback | Playing
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+pause | Loading | | Error
|
||||
+ | Stopped | | Stopped
|
||||
+ | Buffering | continue buffering | Paused
|
||||
+ | Playing | pause output and fill (ring-)buffers to the max | Paused
|
||||
+ | Paused | | Paused
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+stop | Loading | | Error
|
||||
+ | Stopped | | Stopped
|
||||
+ | Buffering | clear buffers | Stopped
|
||||
+ | Playing | stop output and clear buffers | Stopped
|
||||
+ | Paused | clear buffers | Stopped
|
||||
+
|
||||
+events
|
||||
+function | prev. state | event | new state
|
||||
+---------+-------------+----------------------------------------------------------------+----------
|
||||
+ | Buffering | when the buffers are filled start playing | Playing
|
||||
diff --git a/phonon/extractmethodcalls.rb b/phonon/extractmethodcalls.rb
|
||||
deleted file mode 100755
|
||||
index 9100489..0000000
|
||||
--- a/phonon/extractmethodcalls.rb
|
||||
+++ /dev/null
|
||||
@@ -1,527 +0,0 @@
|
||||
-#!/usr/bin/ruby
|
||||
-
|
||||
-class MethodDef
|
||||
- def initialize(returnType, signature, optional)
|
||||
- @returnType = returnType
|
||||
- @signature = signature
|
||||
- @optional = optional
|
||||
- end
|
||||
-
|
||||
- attr_reader :returnType, :signature, :optional
|
||||
- attr_writer :optional
|
||||
-end
|
||||
-
|
||||
-class SignalDef
|
||||
- def initialize(signature)
|
||||
- @signature = signature
|
||||
- end
|
||||
-
|
||||
- attr_reader :signature
|
||||
-end
|
||||
-
|
||||
-class Parser
|
||||
- def initialize(filename)
|
||||
- @file = File.new filename, "r"
|
||||
- @signatures = Hash.new
|
||||
- parse
|
||||
- end
|
||||
-
|
||||
- attr_reader :signatures
|
||||
-
|
||||
- private
|
||||
- def addSignal(signature)
|
||||
- unless @signatures.include? signature
|
||||
- @signatures[signature] = SignalDef.new(signature)
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- def addMethod(returnType, signature, optional)
|
||||
- if @signatures.include? signature
|
||||
- if returnType != ''
|
||||
- if @signatures[signature].returnType == ''
|
||||
- optional = false if @signatures[signature].optional == false
|
||||
- @signatures[signature] = MethodDef.new(returnType, signature, optional)
|
||||
- elsif @signatures[signature].returnType != returnType
|
||||
- fail "same signature '#{signature}' but differing return types: #{returnType} and #{@signatures[signature].returnType}"
|
||||
- end
|
||||
- elsif not optional and @signatures[signature].optional
|
||||
- @signatures[signature].optional = false
|
||||
- end
|
||||
- else
|
||||
- @signatures[signature] = MethodDef.new(returnType, signature, optional)
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- PARSER_RETURN_TYPE = 0
|
||||
- PARSER_RETURN_VAR = 1
|
||||
- PARSER_METHOD_NAME = 2
|
||||
- PARSER_ARGUMENT_TYPE = 3
|
||||
- PARSER_ARGUMENT_VAR = 4
|
||||
-
|
||||
- PARSER2_CLASSNAME = 0
|
||||
- PARSER2_METHODPREFIX = 1
|
||||
-
|
||||
- PARSER3_QMETAOBJECT = 0
|
||||
- PARSER3_SCOPEDELIMIT = 1
|
||||
- PARSER3_INVOKEMETHOD = 2
|
||||
- PARSER3_OPENPARENTH = 3
|
||||
- PARSER3_BACKENDOBJ = 4
|
||||
- PARSER3_METHODNAME = 5
|
||||
- PARSER3_CONNECTION = 6
|
||||
- PARSER3_RET_OR_ARG = 7
|
||||
- PARSER3_RET_OPEN = 8
|
||||
- PARSER3_RET_TYPE = 9
|
||||
- PARSER3_RET_NAME = 10
|
||||
- PARSER3_RET_CLOSE = 11
|
||||
- PARSER3_ARG = 12
|
||||
- PARSER3_ARG_OPEN = 13
|
||||
- PARSER3_ARG_TYPE = 14
|
||||
- PARSER3_ARG_NAME = 15
|
||||
- PARSER3_ARG_CLOSE = 16
|
||||
- PARSER3_CLOSE = 17
|
||||
- PARSER3_DONE = 18
|
||||
-
|
||||
- PARSER4_OPENING_PAREN = 0
|
||||
- PARSER4_SENDER = 1
|
||||
- PARSER4_PRIVATE_SENDER = 2
|
||||
- PARSER4_COMMA_1 = 3
|
||||
- PARSER4_SIGNAL_MACRO = 4
|
||||
- PARSER4_SIGNAL_OPENING_PAREN = 5
|
||||
- PARSER4_SIGNAL_SIGNATURE = 6
|
||||
- PARSER4_SIGNAL_SIGNATURE_OPENING_PAREN = 7
|
||||
- PARSER4_SIGNAL_SIGNATURE_CONST = 8
|
||||
- PARSER4_SIGNAL_SIGNATURE_TYPE1 = 9
|
||||
- PARSER4_SIGNAL_SIGNATURE_TYPE2_1 = 10
|
||||
- PARSER4_SIGNAL_SIGNATURE_TYPE2_2 = 11
|
||||
- PARSER4_SIGNAL_CLOSING_PAREN = 12
|
||||
-
|
||||
- def parse
|
||||
- inbackendcall = false
|
||||
- innamedescriptioncall = false
|
||||
- ininvokemethodcall = false
|
||||
- invokemethodcallOnBackendObject = false
|
||||
- inconnect = false
|
||||
- optionalmethod = false
|
||||
- lasttoken = ';'
|
||||
- thistoken = ';'
|
||||
- returnType = String.new
|
||||
- signature = String.new
|
||||
- parserstate = PARSER_RETURN_TYPE
|
||||
- depth = 0
|
||||
- tokenize do |token|
|
||||
- #STDERR.puts token
|
||||
- lasttoken = thistoken
|
||||
- thistoken = token
|
||||
- token = token[1..-1] if token[0,9] == "pBACKEND_"
|
||||
- if token[0,8] == "BACKEND_"
|
||||
- fail if innamedescriptioncall
|
||||
- fail if inbackendcall
|
||||
- fail if ininvokemethodcall
|
||||
- fail if inconnect
|
||||
- inbackendcall = true
|
||||
- if token[8,3] != "GET" # skip return arg
|
||||
- parserstate = PARSER_METHOD_NAME
|
||||
- returnType = ''
|
||||
- else
|
||||
- parserstate = PARSER_RETURN_TYPE
|
||||
- end
|
||||
- elsif token == 'NAMEDESCRIPTIONFROMINDEX'
|
||||
- fail if innamedescriptioncall
|
||||
- fail if inbackendcall
|
||||
- fail if ininvokemethodcall
|
||||
- fail if inconnect
|
||||
- innamedescriptioncall = true
|
||||
- parserstate = PARSER2_CLASSNAME
|
||||
- elsif token == 'QMetaObject'
|
||||
- fail if innamedescriptioncall
|
||||
- fail if inbackendcall
|
||||
- fail if ininvokemethodcall
|
||||
- fail if inconnect
|
||||
- ininvokemethodcall = true
|
||||
- parserstate = PARSER3_SCOPEDELIMIT
|
||||
- optionalmethod = (lasttoken[-1,1] == '=' or lasttoken == '(' or lasttoken == '!') ? true : false
|
||||
- elsif token == 'connect'
|
||||
- fail if innamedescriptioncall
|
||||
- fail if inbackendcall
|
||||
- fail if ininvokemethodcall
|
||||
- fail if inconnect
|
||||
- inconnect = true
|
||||
- parserstate = PARSER4_OPENING_PAREN
|
||||
- elsif inconnect
|
||||
- #puts "state = #{parserstate}, token = #{token}"
|
||||
- lastparserstate = parserstate
|
||||
- case parserstate
|
||||
- when PARSER4_OPENING_PAREN
|
||||
- parserstate = PARSER4_SENDER if token == '('
|
||||
- when PARSER4_SENDER
|
||||
- # d->m_backendObject or only m_backendObject
|
||||
- parserstate = PARSER4_COMMA_1 if token == 'm_backendObject'
|
||||
- parserstate = PARSER4_PRIVATE_SENDER if token == 'd'
|
||||
- when PARSER4_PRIVATE_SENDER
|
||||
- parserstate = PARSER4_SENDER if token == '->'
|
||||
- when PARSER4_COMMA_1
|
||||
- parserstate = PARSER4_SIGNAL_MACRO if token == ','
|
||||
- when PARSER4_SIGNAL_MACRO
|
||||
- parserstate = PARSER4_SIGNAL_OPENING_PAREN if token == 'SIGNAL'
|
||||
- when PARSER4_SIGNAL_OPENING_PAREN
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE if token == '('
|
||||
- when PARSER4_SIGNAL_SIGNATURE
|
||||
- signature = token
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_OPENING_PAREN
|
||||
- when PARSER4_SIGNAL_SIGNATURE_OPENING_PAREN
|
||||
- case token
|
||||
- when '('
|
||||
- signature += '('
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_CONST
|
||||
- when '()'
|
||||
- signature += '()'
|
||||
- parserstate = PARSER4_SIGNAL_CLOSING_PAREN
|
||||
- end
|
||||
- when PARSER4_SIGNAL_SIGNATURE_CONST
|
||||
- case token
|
||||
- when 'const'
|
||||
- signature += 'const '
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_TYPE1
|
||||
- when ')'
|
||||
- signature += ')'
|
||||
- parserstate = PARSER4_SIGNAL_CLOSING_PAREN
|
||||
- else
|
||||
- signature += token
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_TYPE2_1
|
||||
- end
|
||||
- when PARSER4_SIGNAL_SIGNATURE_TYPE1
|
||||
- case token
|
||||
- when 'const'
|
||||
- when ')'
|
||||
- else
|
||||
- signature += token
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_TYPE2_1
|
||||
- end
|
||||
- when PARSER4_SIGNAL_SIGNATURE_TYPE2_1
|
||||
- case token
|
||||
- when ','
|
||||
- signature += ', '
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_TYPE1
|
||||
- when ')'
|
||||
- signature += ')'
|
||||
- parserstate = PARSER4_SIGNAL_CLOSING_PAREN
|
||||
- else
|
||||
- signature += token
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_TYPE2_2
|
||||
- end
|
||||
- when PARSER4_SIGNAL_SIGNATURE_TYPE2_2
|
||||
- case token
|
||||
- when ','
|
||||
- signature += ', '
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_TYPE1
|
||||
- when ')'
|
||||
- signature += ')'
|
||||
- parserstate = PARSER4_SIGNAL_CLOSING_PAREN
|
||||
- else
|
||||
- signature += token
|
||||
- parserstate = PARSER4_SIGNAL_SIGNATURE_TYPE2_1
|
||||
- end
|
||||
- when PARSER4_SIGNAL_CLOSING_PAREN
|
||||
- addSignal(signature) if token == ')'
|
||||
- end
|
||||
- if parserstate == lastparserstate
|
||||
- inconnect = false
|
||||
- signature = String.new
|
||||
- end
|
||||
- elsif ininvokemethodcall
|
||||
- case parserstate
|
||||
- when PARSER3_BACKENDOBJ
|
||||
- if token == ','
|
||||
- if invokemethodcallOnBackendObject
|
||||
- parserstate += 1
|
||||
- else
|
||||
- ininvokemethodcall = false
|
||||
- end
|
||||
- elsif token =~ /backendObject/
|
||||
- invokemethodcallOnBackendObject = true
|
||||
- end
|
||||
- when PARSER3_SCOPEDELIMIT
|
||||
- if token == '::'
|
||||
- parserstate += 1
|
||||
- else
|
||||
- ininvokemethodcall = false
|
||||
- end
|
||||
- when PARSER3_INVOKEMETHOD
|
||||
- if token == 'invokeMethod'
|
||||
- parserstate += 1
|
||||
- else
|
||||
- ininvokemethodcall = false
|
||||
- end
|
||||
- when PARSER3_OPENPARENTH
|
||||
- fail if token != '('
|
||||
- parserstate += 1
|
||||
- invokemethodcallOnBackendObject = false
|
||||
- when PARSER3_METHODNAME
|
||||
- case token
|
||||
- when ','
|
||||
- signature += '('
|
||||
- parserstate = PARSER3_CONNECTION
|
||||
- else
|
||||
- fail if signature.length > 0
|
||||
- signature = token[1..-2]
|
||||
- end
|
||||
- when PARSER3_CONNECTION
|
||||
- case token
|
||||
- when ','
|
||||
- parserstate = PARSER3_RET_OR_ARG
|
||||
- when ')'
|
||||
- parserstate = PARSER3_CLOSE
|
||||
-# the connection is optional
|
||||
- when 'Q_RETURN_ARG'
|
||||
- parserstate = PARSER3_RET_OPEN
|
||||
- when 'Q_ARG'
|
||||
- returnType = ''
|
||||
- parserstate = PARSER3_ARG_OPEN
|
||||
- end
|
||||
- when PARSER3_RET_OR_ARG
|
||||
- if token == 'Q_RETURN_ARG'
|
||||
- parserstate = PARSER3_RET_OPEN
|
||||
- elsif token == 'Q_ARG'
|
||||
- returnType = ''
|
||||
- parserstate = PARSER3_ARG_OPEN
|
||||
- else
|
||||
- fail "unexpected token '#{token}"
|
||||
- end
|
||||
- when PARSER3_RET_TYPE
|
||||
- if token == ','
|
||||
- parserstate += 1
|
||||
- else
|
||||
- if token == '*' or token == '&' or token == '<' or token == '>' or token == '::' or returnType.empty? or returnType[-1,1] == '<' or returnType[-2,2] == '::'
|
||||
- returnType += token
|
||||
- else
|
||||
- returnType += ' ' + token
|
||||
- end
|
||||
- end
|
||||
- when PARSER3_RET_NAME
|
||||
- parserstate = PARSER3_RET_CLOSE if token == ')'
|
||||
- when PARSER3_RET_CLOSE
|
||||
- case token
|
||||
- when ')'
|
||||
- parserstate = PARSER3_CLOSE
|
||||
- when ','
|
||||
- parserstate = PARSER3_ARG
|
||||
- end
|
||||
- when PARSER3_ARG
|
||||
- if token == 'Q_ARG'
|
||||
- parserstate = PARSER3_ARG_OPEN
|
||||
- else
|
||||
- fail "unexpected token '#{token}"
|
||||
- end
|
||||
- when PARSER3_ARG_TYPE
|
||||
- if token == ','
|
||||
- parserstate += 1
|
||||
- else
|
||||
- signature += ' ' if signature[-1,1] =~ /\w/ and token[0,1] =~ /\w/
|
||||
- signature += token
|
||||
- end
|
||||
- when PARSER3_ARG_NAME
|
||||
- case token
|
||||
- when '('
|
||||
- depth += 1
|
||||
- when ')'
|
||||
- if depth == 0
|
||||
- parserstate = PARSER3_ARG_CLOSE
|
||||
- else
|
||||
- depth -= 1
|
||||
- end
|
||||
- end
|
||||
- when PARSER3_ARG_CLOSE
|
||||
- case token
|
||||
- when ','
|
||||
- signature += ','
|
||||
- parserstate = PARSER3_ARG
|
||||
- when ')'
|
||||
- parserstate = PARSER3_CLOSE
|
||||
- else
|
||||
- fail
|
||||
- end
|
||||
- when PARSER3_ARG_OPEN, PARSER3_RET_OPEN
|
||||
- fail if token != '('
|
||||
- parserstate += 1
|
||||
- when PARSER3_CLOSE
|
||||
- signature += ')'
|
||||
- addMethod returnType, signature, optionalmethod
|
||||
- ininvokemethodcall = false
|
||||
- returnType = String.new
|
||||
- signature = String.new
|
||||
- end
|
||||
- elsif innamedescriptioncall
|
||||
- case parserstate
|
||||
- when PARSER2_CLASSNAME
|
||||
- parserstate = PARSER2_METHODPREFIX if token == ','
|
||||
- when PARSER2_METHODPREFIX
|
||||
- addMethod 'QSet<int>', token + 'Indexes()', false
|
||||
- addMethod 'int', token + 'Name()', false
|
||||
- addMethod 'int', token + 'Description()', false
|
||||
- innamedescriptioncall = false
|
||||
- end
|
||||
- elsif inbackendcall
|
||||
- next if token == '(' # skip (
|
||||
- if token == ';'
|
||||
- if signature.length > 0
|
||||
- signature += ')'
|
||||
- addMethod returnType, signature, false
|
||||
- signature = String.new
|
||||
- returnType = String.new
|
||||
- end
|
||||
- inbackendcall = false
|
||||
- else
|
||||
- if token == ','
|
||||
- if parserstate == PARSER_ARGUMENT_VAR
|
||||
- signature += ','
|
||||
- parserstate = PARSER_ARGUMENT_TYPE
|
||||
- else
|
||||
- parserstate += 1
|
||||
- end
|
||||
- next
|
||||
- end
|
||||
- case parserstate
|
||||
- when PARSER_RETURN_TYPE
|
||||
- returnType += token
|
||||
- when PARSER_RETURN_VAR
|
||||
- when PARSER_METHOD_NAME
|
||||
- next if token == ')'
|
||||
- fail if token[0,1] != '"' or token[-1,1] != '"'
|
||||
- fail if signature.length > 0
|
||||
- signature = token[1..-2] + '('
|
||||
- when PARSER_ARGUMENT_TYPE
|
||||
- signature += token
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- def tokenize
|
||||
- incomment = false
|
||||
- instring = false
|
||||
- laststring = ''
|
||||
- linenum = 0
|
||||
- @file.each_line do |line|
|
||||
- linenum += 1
|
||||
- line.strip!
|
||||
- next if line[0..1] == "//"
|
||||
- next if line[0,1] == "#" # ignore preprocessor statements
|
||||
- line.split(/(\b|\s+)/).each do |token|
|
||||
- #STDERR.puts "string: #{instring} comment: #{incomment} token: '#{token}'"
|
||||
- if instring
|
||||
- indexOfEscapedQuote = token.index '\\"'
|
||||
- if indexOfEscapedQuote != nil
|
||||
- laststring += token
|
||||
- next
|
||||
- end
|
||||
- indexOfQuote = token.index '"'
|
||||
- if indexOfQuote and indexOfQuote > 0
|
||||
- fail if token[indexOfQuote-1,1] == '\\'
|
||||
- laststring += token[0..indexOfQuote-1]
|
||||
- token = token[indexOfQuote..-1]
|
||||
- end
|
||||
- if token[0,2] == '""'
|
||||
- laststring += token[2..-1]
|
||||
- next
|
||||
- elsif token[0,1] == '"'
|
||||
- if laststring[-1,1] == '\\'
|
||||
- laststring[-1,1] = '"'
|
||||
- laststring += token[1..-1]
|
||||
- next
|
||||
- end
|
||||
- instring = false
|
||||
- yield laststring + '"'
|
||||
- token = token[1..-1]
|
||||
- else
|
||||
- laststring += token
|
||||
- next
|
||||
- end
|
||||
- end
|
||||
- token.strip!
|
||||
- next if token.empty?
|
||||
- if incomment
|
||||
- incomment = false if token[0..1] == "*/"
|
||||
- next
|
||||
- else
|
||||
- if token[0..1] == "/*"
|
||||
- incomment = true
|
||||
- next
|
||||
- end
|
||||
- break if token == "//"
|
||||
- end
|
||||
- doublequote = token.index '""'
|
||||
- if doublequote != nil
|
||||
- if doublequote > 0
|
||||
- yield token[0,doublequote]
|
||||
- end
|
||||
- yield '""'
|
||||
- if token.length > doublequote+2
|
||||
- token = token[doublequote+2..-1]
|
||||
- else
|
||||
- next
|
||||
- end
|
||||
- end
|
||||
- quote = token.index '"'
|
||||
- if quote != nil
|
||||
- laststring = token[quote..-1]
|
||||
- instring = true
|
||||
- if quote > 0
|
||||
- token = token[0,quote]
|
||||
- else
|
||||
- next
|
||||
- end
|
||||
- end
|
||||
- semicolon = token.index ';'
|
||||
- if not semicolon
|
||||
- tokenize2(token) { |i| yield i }
|
||||
- elsif semicolon > 0
|
||||
- tokenize2(token[0..semicolon-1]) { |i| yield i }
|
||||
- yield ';'
|
||||
- if token.length > semicolon + 1
|
||||
- tokenize2(token[semicolon+1..-1]) { |i| yield i }
|
||||
- end
|
||||
- elsif (semicolon == 0 and token.length > 1)
|
||||
- yield ';'
|
||||
- tokenize2(token[1..-1]) { |i| yield i }
|
||||
- else
|
||||
- yield token # a single ;
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- def tokenize2(token)
|
||||
- if token.length > 1
|
||||
- #STDERR.puts "long token: #{token}"
|
||||
- while token[0,1] == '(' or token[0,1] == ')' or token[0,1] == "'" or token[0,1] == '&'
|
||||
- yield token[0,1]
|
||||
- token = token[1..-1]
|
||||
- #STDERR.puts "less long token: #{token}"
|
||||
- end
|
||||
- return if token.empty?
|
||||
- if token.length == 1
|
||||
- yield token
|
||||
- return
|
||||
- elsif token[-1,1] == ',' or token[-1,1] == "'"
|
||||
- yield token[0..-2]
|
||||
- yield token[-1,1]
|
||||
- return
|
||||
- end
|
||||
- end
|
||||
- yield token
|
||||
- end
|
||||
-end
|
||||
-
|
||||
-p = Parser.new ARGV[0]
|
||||
-p.signatures.each do |signature,method|
|
||||
- if method.class == SignalDef
|
||||
- puts "addSignal(\"#{signature}\");"
|
||||
- else
|
||||
- if method.optional
|
||||
- puts "addMethod(\"#{method.returnType}\", \"#{signature}\", true);"
|
||||
- else
|
||||
- puts "addMethod(\"#{method.returnType}\", \"#{signature}\");"
|
||||
- end
|
||||
- end
|
||||
-end
|
||||
diff --git a/phonon/preprocessandextract.sh b/phonon/preprocessandextract.sh
|
||||
deleted file mode 100755
|
||||
index 13b1704..0000000
|
||||
--- a/phonon/preprocessandextract.sh
|
||||
+++ /dev/null
|
||||
@@ -1,39 +0,0 @@
|
||||
-#!/bin/sh
|
||||
-EXTRACT="`dirname $0`/extractmethodcalls.rb"
|
||||
-IGNORE="^\(streameventqueue\|abstractmediastream2\|lockfreequeue\|path\|platform\|iodevicestream\|medianode\|streaminterface\|mediasource\|abstractmediastream\|audioplayer\|globalconfig\|objectdescriptionmodel\|audiooutputadaptor\|effectwidget\|videoplayer\|seekslider\|volumeslider\).cpp$"
|
||||
-
|
||||
-if test -n "$1" -a -f "$1"; then
|
||||
- echo "preprocessing $1"
|
||||
- cpp $1 2>/dev/null > tmp
|
||||
- echo "extracting backend calls from $1"
|
||||
- $EXTRACT tmp > tests/methods/$1
|
||||
- rm tmp
|
||||
-else
|
||||
- for i in *.cpp; do
|
||||
- if echo $i | grep -q "$IGNORE"; then
|
||||
- printf "%-30s ignored.\n" "$i:"
|
||||
- elif echo $i | grep -q '_p\.cpp$'; then
|
||||
- printf "%-30s postponed.\n" "$i:"
|
||||
- else
|
||||
- printf "%-30s preprocessing" "$i:"
|
||||
- cpp $i 2>/dev/null > tmp
|
||||
- echo -n ", extracting backend calls"
|
||||
- $EXTRACT tmp > tests/methods/$i
|
||||
- rm tmp
|
||||
- echo "."
|
||||
- fi
|
||||
- done
|
||||
- for i in *_p.cpp; do
|
||||
- cpp=`echo $i | sed 's,_p\.cpp$,\.cpp,'`
|
||||
- if echo $cpp | grep -q "$IGNORE"; then
|
||||
- printf "%-30s ignored.\n" "$i:"
|
||||
- elif test "$i" != "*_p.cpp"; then
|
||||
- printf "%-30s preprocessing" "$i:"
|
||||
- cpp $i 2>/dev/null > tmp
|
||||
- echo -n ", extracting backend calls"
|
||||
- $EXTRACT tmp >> tests/methods/$cpp
|
||||
- rm tmp
|
||||
- echo "."
|
||||
- fi
|
||||
- done
|
||||
-fi
|
||||
diff --git a/phonon/stream-thoughts b/phonon/stream-thoughts
|
||||
deleted file mode 100644
|
||||
index 5fb6711..0000000
|
||||
--- a/phonon/stream-thoughts
|
||||
+++ /dev/null
|
||||
@@ -1,72 +0,0 @@
|
||||
-there are two different kind of streams: 1. media files 2. live radio/television
|
||||
-
|
||||
-The difference cannot reliably be determined by the backend so the application has to tell the
|
||||
-frontend.
|
||||
-
|
||||
-This is the expected behaviour:
|
||||
-1. media files
|
||||
-==============
|
||||
-function | prev. state | action | new state
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-ctor | | | Loading
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-setUrl | Loading | refill buffers | Loading
|
||||
- | Stopped | refill buffers | Loading
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-play | Loading | continue buffering | Buffering
|
||||
- | Stopped | start playing | Playing
|
||||
- | Buffering | continue buffering | Buffering
|
||||
- | Playing | | Playing
|
||||
- | Paused | continue playback | Playing
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-pause | Loading | | Loading
|
||||
- | Stopped | | Stopped
|
||||
- | Buffering | continue buffering | Paused
|
||||
- | Playing | pause output and fill buffers to the max | Paused
|
||||
- | Paused | | Paused
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-stop | Loading | | Loading
|
||||
- | Stopped | | Stopped
|
||||
- | Buffering | restart buffering from the beginning of the file | Loading
|
||||
- | Playing | stop output and refill buffers from the beginning of the file | Loading
|
||||
- | Paused | restart buffering from the beginning of the file | Loading
|
||||
-
|
||||
-events
|
||||
-function | prev. state | event | new state
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
- | Buffering | when the buffers are filled start playing | Playing
|
||||
- | Loading | when buffers are filled | Stopped
|
||||
-
|
||||
-
|
||||
-
|
||||
-2. live stream
|
||||
-==============
|
||||
-function | prev. state | action | new state
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-ctor | | | Loading
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-setUrl | Loading | | Stopped
|
||||
- | Stopped | | Stopped
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-play | Loading | | Error
|
||||
- | Stopped | start buffering | Buffering
|
||||
- | Buffering | continue buffering | Buffering
|
||||
- | Playing | | Playing
|
||||
- | Paused | continue playback | Playing
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-pause | Loading | | Error
|
||||
- | Stopped | | Stopped
|
||||
- | Buffering | continue buffering | Paused
|
||||
- | Playing | pause output and fill (ring-)buffers to the max | Paused
|
||||
- | Paused | | Paused
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
-stop | Loading | | Error
|
||||
- | Stopped | | Stopped
|
||||
- | Buffering | clear buffers | Stopped
|
||||
- | Playing | stop output and clear buffers | Stopped
|
||||
- | Paused | clear buffers | Stopped
|
||||
-
|
||||
-events
|
||||
-function | prev. state | event | new state
|
||||
----------+-------------+----------------------------------------------------------------+----------
|
||||
- | Buffering | when the buffers are filled start playing | Playing
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up phonon-4.5.57/phonon/CMakeLists.txt.plugindir phonon-4.5.57/phonon/CMakeLists.txt
|
||||
--- phonon-4.5.57/phonon/CMakeLists.txt.plugindir 2011-10-21 08:54:42.000000000 -0500
|
||||
+++ phonon-4.5.57/phonon/CMakeLists.txt 2011-12-07 12:18:01.148682382 -0600
|
||||
@@ -78,7 +78,7 @@ if (PHONON_NO_PLATFORMPLUGIN)
|
||||
add_definitions(-DQT_NO_PHONON_PLATFORMPLUGIN)
|
||||
endif (PHONON_NO_PLATFORMPLUGIN)
|
||||
|
||||
-add_definitions(-DPHONON_LIBRARY_PATH="${PLUGIN_INSTALL_DIR}/plugins")
|
||||
+add_definitions(-DPHONON_LIBRARY_PATH="${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}/plugins")
|
||||
|
||||
automoc4_add_library(phonon SHARED ${phonon_LIB_SRCS})
|
||||
target_link_libraries(phonon ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
@ -0,0 +1,12 @@
|
||||
diff -up phonon-4.6.0/PhononConfig.cmake.in.rootDir phonon-4.6.0/PhononConfig.cmake.in
|
||||
--- phonon-4.6.0/PhononConfig.cmake.in.rootDir 2011-12-19 14:30:45.000000000 -0600
|
||||
+++ phonon-4.6.0/PhononConfig.cmake.in 2013-10-30 13:59:06.518252188 -0500
|
||||
@@ -4,7 +4,7 @@
|
||||
set(PHONON_VERSION "@PHONON_LIB_MAJOR_VERSION@.@PHONON_LIB_MINOR_VERSION@.@PHONON_LIB_PATCH_VERSION@")
|
||||
|
||||
get_filename_component(currentDir ${CMAKE_CURRENT_LIST_FILE} PATH) # get the directory where I myself am
|
||||
-get_filename_component(rootDir ${currentDir}/@relInstallDir@ ABSOLUTE) # get the chosen install prefix
|
||||
+get_filename_component(rootDir ${CMAKE_INSTALL_PREFIX} ABSOLUTE) # get the chosen install prefix
|
||||
|
||||
set(PHONON_PULSESUPPORT @PHONON_PULSESUPPORT@)
|
||||
set(PHONON_FOUND_EXPERIMENTAL @PHONON_BUILD_EXPERIMENTAL@)
|
@ -1,12 +0,0 @@
|
||||
diff -up phonon-4.6.0/qt_phonon.pri.me phonon-4.6.0/qt_phonon.pri
|
||||
--- phonon-4.6.0/qt_phonon.pri.me 2012-03-28 18:22:06.623520519 +0200
|
||||
+++ phonon-4.6.0/qt_phonon.pri 2012-03-28 18:22:15.886519552 +0200
|
||||
@@ -3,6 +3,6 @@
|
||||
# the next build of Qt. So pretend we're not there in this case.
|
||||
# This file is loaded by qt_config.prf, before .qmake.cache has been loaded.
|
||||
# Consequently, we have to do some stunts to get values out of the cache.
|
||||
-if(!exists($$_QMAKE_CACHE_)| \
|
||||
- !contains($$list($$fromfile($$_QMAKE_CACHE_, CONFIG)), QTDIR_build)): \
|
||||
+!exists($$_QMAKE_CACHE_)| \
|
||||
+ !contains($$list($$fromfile($$_QMAKE_CACHE_, CONFIG)), QTDIR_build): \
|
||||
QT_CONFIG += phonon
|
Loading…
Reference in new issue