mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-07 04:30:43 +02:00
Compare commits
54 Commits
doubleVlc
...
docker-act
Author | SHA1 | Date | |
---|---|---|---|
|
da54a948a6 | ||
|
f69c8bc708 | ||
|
5761027839 | ||
|
a743058db0 | ||
|
343bc93f3b | ||
|
130f4193af | ||
|
372ad91db4 | ||
|
27e8a665cf | ||
|
fdca99e57d | ||
|
e3bb74ce25 | ||
|
4aa06f524c | ||
|
8c3dc90f76 | ||
|
ba5759d453 | ||
|
18b42539e4 | ||
|
299f033ef9 | ||
|
777b312191 | ||
|
1ab3ed9f93 | ||
|
9327204c78 | ||
|
60672e2d0c | ||
|
4375c8e0c4 | ||
|
092313cd7f | ||
|
783e853c2a | ||
|
368032f399 | ||
|
ec2b9d84eb | ||
|
378f8262cf | ||
|
3f012ac9f8 | ||
|
d7cc6b5719 | ||
|
d5c8026a9e | ||
|
0ec2df0ac6 | ||
|
84ec28e476 | ||
|
62feb25f5c | ||
|
80d2fa48ec | ||
|
4815dd78c1 | ||
|
3b1e0b3cf1 | ||
|
a563993b71 | ||
|
57bc920534 | ||
|
be919f74f9 | ||
|
bdc3238e6e | ||
|
333806ef4a | ||
|
084084db22 | ||
|
a6cb6a92e6 | ||
|
2b95da1a32 | ||
|
25da5bdbc5 | ||
|
d7b9c5464d | ||
|
d96dc74353 | ||
|
73091bec21 | ||
|
021223f6cc | ||
|
7302047e9a | ||
|
119a7ebdb8 | ||
|
af0cb18972 | ||
|
34c1f88171 | ||
|
00f602e102 | ||
|
c838959248 | ||
|
97a407f837 |
16
.github/workflows/ccpp.yml
vendored
Normal file
16
.github/workflows/ccpp.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: C/C++ CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: tomahawkmusicplayer/ubuntu:latest
|
||||
env:
|
||||
MIX_ENV: test
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
- name: Build and test
|
||||
run: /usr/local/bin/build-and-test.sh
|
18
.github/workflows/docker.yml
vendored
Normal file
18
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Login to DockerHub Registry
|
||||
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||
- name: Build the Docker image
|
||||
run: cd Docker && docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/ubuntu:latest
|
||||
- name: Push the latest Docker image
|
||||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/ubuntu:latest
|
262
CMakeLists.txt
262
CMakeLists.txt
@@ -2,10 +2,18 @@ PROJECT( tomahawk )
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
|
||||
CMAKE_POLICY(SET CMP0017 NEW)
|
||||
CMAKE_POLICY(SET CMP0022 NEW)
|
||||
IF(POLICY CMP0075)
|
||||
CMAKE_POLICY(SET CMP0075 NEW)
|
||||
ENDIF()
|
||||
|
||||
# TODO:
|
||||
# Update to NEW and fix things up
|
||||
CMAKE_POLICY(SET CMP0023 OLD)
|
||||
CMAKE_POLICY(SET CMP0023 NEW)
|
||||
|
||||
# Let AUTOMOC and AUTOUIC process generated files
|
||||
IF(POLICY CMP0071)
|
||||
CMAKE_POLICY(SET CMP0071 NEW)
|
||||
ENDIF()
|
||||
|
||||
# TODO:
|
||||
# Disable automatic qtmain linking
|
||||
@@ -89,8 +97,7 @@ endif()
|
||||
option(BUILD_GUI "Build Tomahawk with GUI" ON)
|
||||
option(BUILD_TESTS "Build Tomahawk with unit tests" ${BUILD_NO_RELEASE})
|
||||
option(BUILD_TOOLS "Build Tomahawk helper tools" ${BUILD_NO_RELEASE})
|
||||
option(BUILD_HATCHET "Build the Hatchet plugin" ON)
|
||||
option(BUILD_WITH_QT4 "Build Tomahawk with Qt4 instead of Qt5" OFF)
|
||||
option(BUILD_HATCHET "Build the Hatchet plugin" OFF)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(CRASHREPORTER_ENABLED_BY_DEFAULT OFF)
|
||||
@@ -99,8 +106,6 @@ else()
|
||||
endif()
|
||||
option(WITH_CRASHREPORTER "Build with CrashReporter" ${CRASHREPORTER_ENABLED_BY_DEFAULT})
|
||||
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON)
|
||||
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
||||
option(WITH_KDE4 "Build with support for KDE specific stuff" ON)
|
||||
|
||||
# build options for development purposes
|
||||
option(SANITIZE_ADDRESS "Enable Address Sanitizer for memory error detection" OFF)
|
||||
@@ -161,171 +166,52 @@ INCLUDE( MacroLogFeature )
|
||||
|
||||
message( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} ***" )
|
||||
|
||||
if( NOT BUILD_WITH_QT4 )
|
||||
find_package(Qt5Core QUIET)
|
||||
if( Qt5Core_DIR )
|
||||
# CMAKE 2.8.13+/3.0.0+ requires these for IMPORTed targets
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5X11Extras NO_MODULE QUIET)
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
find_package(Qt5Gui REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Sql REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5X11Extras NO_MODULE QUIET)
|
||||
|
||||
if(Qt5X11Extras_FOUND)
|
||||
set(HAVE_X11 TRUE)
|
||||
else()
|
||||
set(HAVE_X11 FALSE)
|
||||
endif()
|
||||
|
||||
message(STATUS "Found Qt5!")
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
# We need this to find the paths to qdbusxml2cpp and co
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(Qt5WinExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt5_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
macro(qt_add_translation)
|
||||
qt5_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
macro(qt_add_dbus_interface)
|
||||
qt5_add_dbus_interface(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_adaptor)
|
||||
qt5_add_dbus_adaptor(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
macro(setup_qt)
|
||||
endmacro()
|
||||
|
||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||
#FIXME: CrashReporter depends on deprecated QHttp
|
||||
set(WITH_KDE4 OFF)
|
||||
endif()
|
||||
endif()
|
||||
if( NOT Qt5Core_DIR )
|
||||
message(STATUS "Could not find Qt5, searching for Qt4 instead...")
|
||||
|
||||
if(NOT FORCE_QT4)
|
||||
message(FATAL_ERROR "Qt4 support is broken, if you plan to fix it, add -DFORCE_QT4=ON to your cmake arguments otherwise you should compile Tomahawk with Qt5")
|
||||
endif()
|
||||
|
||||
set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork")
|
||||
if( BUILD_GUI )
|
||||
list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" "QtSvg")
|
||||
endif()
|
||||
if( BUILD_TESTS )
|
||||
list(APPEND NEEDED_QT4_COMPONENTS "QtTest")
|
||||
endif()
|
||||
|
||||
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
|
||||
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt-project.org" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
|
||||
|
||||
macro(qt5_use_modules)
|
||||
endmacro()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt4_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt4_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_translation)
|
||||
qt4_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_interface)
|
||||
qt4_add_dbus_interface(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_adaptor)
|
||||
qt4_add_dbus_adaptor(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(setup_qt)
|
||||
if( NOT BUILD_GUI )
|
||||
set(QT_DONT_USE_QTGUI TRUE)
|
||||
endif()
|
||||
if( UNIX AND NOT APPLE )
|
||||
set(QT_USE_QTDBUS TRUE)
|
||||
endif()
|
||||
set(QT_USE_QTSQL TRUE)
|
||||
set(QT_USE_QTNETWORK TRUE)
|
||||
set(QT_USE_QTXML TRUE)
|
||||
set(QT_USE_QTWEBKIT TRUE)
|
||||
|
||||
include( ${QT_USE_FILE} )
|
||||
endmacro()
|
||||
|
||||
# Qt5 C++11 Macros not defined within Qt4
|
||||
# TODO: Add C++11 support
|
||||
tomahawk_add_definitions( "-DQ_DECL_FINAL=" )
|
||||
tomahawk_add_definitions( "-DQ_DECL_OVERRIDE=" )
|
||||
endif()
|
||||
|
||||
if( Qt5Core_DIR )
|
||||
set( TOMAHAWK_QT5_TMP TRUE)
|
||||
else( Qt5Core_DIR )
|
||||
set( TOMAHAWK_QT5_TMP FALSE )
|
||||
endif( Qt5Core_DIR )
|
||||
set( TOMAHAWK_QT5 ${TOMAHAWK_QT5_TMP} CACHE BOOL "Build Tomahawk with Qt5")
|
||||
|
||||
if( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||
macro_optional_find_package( X11 )
|
||||
macro_log_feature(X11_FOUND "X11" "The Xorg libraries" "http://www.x.org/wiki/" TRUE "" "Xorg libraries are used by libqnetwm to bring windows to front reliably")
|
||||
endif()
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag( "-std=c++11" CXX11_FOUND )
|
||||
check_cxx_compiler_flag( "-std=c++0x" CXX0X_FOUND )
|
||||
check_cxx_compiler_flag( "-stdlib=libc++" LIBCPP_FOUND )
|
||||
if(CXX11_FOUND)
|
||||
tomahawk_add_cxx_flags( "-std=c++11" )
|
||||
elseif(CXX0X_FOUND)
|
||||
tomahawk_add_cxx_flags( "-std=c++0x" )
|
||||
if(Qt5X11Extras_FOUND)
|
||||
set(HAVE_X11 TRUE)
|
||||
else()
|
||||
message(STATUS "${CMAKE_CXX_COMPILER} does not support C++11, please use a
|
||||
different compiler")
|
||||
set(HAVE_X11 FALSE)
|
||||
endif()
|
||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR APPLE) AND LIBCPP_FOUND)
|
||||
tomahawk_add_cxx_flags( "-stdlib=libc++" )
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
# We need this to find the paths to qdbusxml2cpp and co
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(Qt5WinExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
|
||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||
# FIXME: CrashReporter depends on deprecated QHttp
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS filesystem system)
|
||||
macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++ source libraries" "http://www.boost.org" TRUE "" "") #FIXME: give useful explanation
|
||||
|
||||
macro_optional_find_package(Lucene++ 3.0.0)
|
||||
macro_log_feature(LUCENEPP_FOUND "Lucene++" "The open-source, C++ search engine" "https://github.com/luceneplusplus/LucenePlusPlus/" TRUE "" "Lucene++ is used for indexing the collection")
|
||||
|
||||
if( NOT TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(QJSON 0.8.1)
|
||||
macro_log_feature(QJSON_FOUND "QJson" "Qt library that maps JSON data to QVariant objects" "http://qjson.sf.net" TRUE "" "libqjson is used for encoding communication between Tomahawk instances")
|
||||
ENDIF()
|
||||
|
||||
macro_optional_find_package(Taglib 1.8.0)
|
||||
macro_log_feature(TAGLIB_FOUND "TagLib" "Audio Meta-Data Library" "http://developer.kde.org/~wheeler/taglib.html" TRUE "" "taglib is needed for reading meta data from audio files")
|
||||
include( CheckTagLibFileName )
|
||||
@@ -344,23 +230,15 @@ macro_log_feature(GNUTLS_FOUND "GnuTLS"
|
||||
"http://gnutls.org/" TRUE ""
|
||||
"GnuTLS is needed for serving the Playdar/HTTP API via TLS")
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(Qca-qt5)
|
||||
if(Qca-qt5_DIR)
|
||||
set(QCA2_FOUND ON CACHE BOOL "QCA2 was found")
|
||||
set(QCA2_LIBRARIES "qca-qt5" CACHE STRING "QCA2 Qt5 target")
|
||||
endif()
|
||||
else()
|
||||
macro_optional_find_package(QCA2)
|
||||
macro_optional_find_package(Qca-qt5)
|
||||
if(Qca-qt5_DIR)
|
||||
set(QCA2_FOUND ON CACHE BOOL "QCA2 was found")
|
||||
set(QCA2_LIBRARIES "qca-qt5" CACHE STRING "QCA2 Qt5 target")
|
||||
endif()
|
||||
macro_log_feature(QCA2_FOUND "QCA2" "Provides encryption and signing functions necessary for some resolvers and accounts" "http://delta.affinix.com/qca/" TRUE "" "")
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(KF5Attica 1.0.0)
|
||||
set(LIBATTICA_FOUND ${KF5Attica_FOUND})
|
||||
else()
|
||||
macro_optional_find_package(LibAttica 0.4.0)
|
||||
endif()
|
||||
macro_optional_find_package(KF5Attica 1.0.0)
|
||||
set(LIBATTICA_FOUND ${KF5Attica_FOUND})
|
||||
macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for installation of resolvers from the Tomahawk website" "http://download.kde.org/stable/attica/" TRUE "" "")
|
||||
|
||||
macro_optional_find_package(QuaZip)
|
||||
@@ -376,21 +254,13 @@ macro_optional_find_package(LibLastFm 1.0.0)
|
||||
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/lastfm/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
|
||||
if( NOT APPLE )
|
||||
if( TOMAHAWK_QT5 )
|
||||
macro_optional_find_package(Qt5Keychain 0.1.0)
|
||||
else()
|
||||
macro_optional_find_package(QtKeychain 0.1.0)
|
||||
endif()
|
||||
macro_log_feature(QTKEYCHAIN_FOUND "QtKeychain" "Provides support for secure credentials storage" "https://github.com/frankosterfeld/qtkeychain" TRUE "" "")
|
||||
macro_optional_find_package(Qt5Keychain 0.1.0)
|
||||
macro_log_feature(Qt5Keychain_FOUND "QtKeychain" "Provides support for secure credentials storage" "https://github.com/frankosterfeld/qtkeychain" TRUE "" "")
|
||||
endif()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
macro_optional_find_package(TelepathyQt 0.9.3)
|
||||
if ( TOMAHAWK_QT5 )
|
||||
macro_log_feature(TelepathyQt5_FOUND "Telepathy-Qt" "Telepathy-Qt is a Qt high-level binding for Telepathy, a D-Bus framework for unifying real time communication." FALSE "" "Telepathy-Qt is needed for sharing Jabber/GTalk accounts with Telepathy.\n")
|
||||
else ( TOMAHAWK_QT5)
|
||||
macro_log_feature(TelepathyQt4_FOUND "Telepathy-Qt" "Telepathy-Qt is a Qt high-level binding for Telepathy, a D-Bus framework for unifying real time communication." FALSE "" "Telepathy-Qt is needed for sharing Jabber/GTalk accounts with Telepathy.\n")
|
||||
endif()
|
||||
macro_log_feature(TelepathyQt5_FOUND "Telepathy-Qt" "Telepathy-Qt is a Qt high-level binding for Telepathy, a D-Bus framework for unifying real time communication." FALSE "" "Telepathy-Qt is needed for sharing Jabber/GTalk accounts with Telepathy.\n")
|
||||
endif()
|
||||
|
||||
# we need pthreads too
|
||||
@@ -435,23 +305,7 @@ add_subdirectory(${THIRDPARTY_DIR}/libportfwd)
|
||||
|
||||
#### submodules end
|
||||
|
||||
|
||||
if (WITH_KDE4)
|
||||
macro_optional_find_package(KDE4)
|
||||
macro_optional_find_package(KDE4Installed)
|
||||
endif(WITH_KDE4)
|
||||
macro_log_feature(KDE4_FOUND "KDE4" "Provides support for configuring Telepathy Accounts from inside Tomahawk" "https://www.kde.org" FALSE "" "")
|
||||
|
||||
IF( KDE4_FOUND )
|
||||
IF( CMAKE_C_FLAGS )
|
||||
# KDE4 adds and removes some compiler flags that we don't like
|
||||
# (only for gcc not for clang e.g.)
|
||||
STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
ENDIF()
|
||||
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
|
||||
#show dep log
|
||||
macro_display_feature_log()
|
||||
@@ -464,11 +318,6 @@ CONFIGURE_FILE(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
# KDE4 defines an uninstall target for us automatically (and at least with Qt4 Phonon does as well no matter if kdelibs was found)
|
||||
# IF( NOT KDE4_FOUND )
|
||||
# ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
# ENDIF()
|
||||
|
||||
IF( ( NOT APPLE ) AND ( NOT SANITIZE_ADDRESS ))
|
||||
# Make linking as strict on linux as it is on osx. Then we don't break linking on mac so often
|
||||
#
|
||||
@@ -498,6 +347,7 @@ ADD_SUBDIRECTORY( src )
|
||||
ADD_SUBDIRECTORY( admin )
|
||||
|
||||
IF(BUILD_TESTS)
|
||||
find_package(Qt5Test REQUIRED)
|
||||
enable_testing()
|
||||
ADD_SUBDIRECTORY( src/tests )
|
||||
ENDIF()
|
||||
|
@@ -6,31 +6,22 @@
|
||||
# LIBJREEN_FOUND, whether libjreen was found
|
||||
|
||||
FIND_PACKAGE(PkgConfig QUIET)
|
||||
if( TOMAHAWK_QT5 )
|
||||
set(JREEN_LIB_SUFFIX "-qt5")
|
||||
set(JREEN_INCLUDE_SUFFIX ${JREEN_LIB_SUFFIX})
|
||||
else()
|
||||
set(JREEN_INCLUDE_SUFFIX "-qt4")
|
||||
endif()
|
||||
PKG_CHECK_MODULES(PC_JREEN QUIET libjreen${JREEN_LIB_SUFFIX})
|
||||
PKG_CHECK_MODULES(PC_JREEN QUIET libjreen-qt5)
|
||||
|
||||
FIND_PATH(JREEN_INCLUDE_DIR NAMES jreen/jreen.h
|
||||
HINTS
|
||||
${PC_JREEN_INCLUDEDIR}
|
||||
${PC_JREEN_INCLUDE_DIRS}
|
||||
${CMAKE_INSTALL_INCLUDEDIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES
|
||||
jreen${JREEN_INCLUDE_SUFFIX}
|
||||
|
||||
jreen-qt5
|
||||
)
|
||||
|
||||
FIND_LIBRARY(JREEN_LIBRARIES NAMES jreen${JREEN_LIB_SUFFIX}
|
||||
FIND_LIBRARY(JREEN_LIBRARIES NAMES jreen-qt5
|
||||
HINTS
|
||||
${PC_JREEN_LIBDIR}
|
||||
${PC_JREEN_LIBRARY_DIRS}
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
IF(JREEN_LIBRARIES AND JREEN_INCLUDE_DIR AND NOT PC_JREEN_VERSION)
|
||||
|
@@ -1,20 +0,0 @@
|
||||
# Simple hack to detect wether KDE4 is *installed* -- not anything about the development environment!
|
||||
|
||||
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
|
||||
|
||||
# For KDE4 kde-config has been renamed to kde4-config
|
||||
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
|
||||
# the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended
|
||||
PATH_SUFFIXES bin
|
||||
HINTS
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
${_KDEDIRS}
|
||||
/opt/kde4
|
||||
ONLY_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
||||
IF (KDE4_KDECONFIG_EXECUTABLE)
|
||||
SET (KDE4_INSTALLED TRUE)
|
||||
message(STATUS "KDE4 is installed, will install protocol file")
|
||||
ENDIF (KDE4_KDECONFIG_EXECUTABLE)
|
||||
|
@@ -7,21 +7,15 @@
|
||||
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
#
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
set(LASTFM_LIB_SUFFIX "5")
|
||||
endif()
|
||||
|
||||
# Include dir
|
||||
find_path(LIBLASTFM_INCLUDE_DIR
|
||||
# Track.h doesn't exist in liblastfm-0.3.1, was called Track back then
|
||||
NAMES lastfm${LASTFM_LIB_SUFFIX}/Track.h
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
NAMES lastfm5/Track.h
|
||||
)
|
||||
|
||||
# Finally the library itself
|
||||
find_library(LIBLASTFM_LIBRARY
|
||||
NAMES lastfm${LASTFM_LIB_SUFFIX}
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
NAMES lastfm5
|
||||
)
|
||||
|
||||
set(LIBLASTFM_LIBRARIES ${LIBLASTFM_LIBRARY})
|
||||
|
@@ -74,10 +74,10 @@ FIND_PATH(LUCENEPP_LIBRARY_DIR
|
||||
IF (LUCENEPP_LIBRARY_DIR)
|
||||
MESSAGE(STATUS "Found Lucene++ library dir: ${LUCENEPP_LIBRARY_DIR}")
|
||||
|
||||
IF (LUCENEPP_VERSION STRLESS "${LUCENEPP_MIN_VERSION}")
|
||||
IF (LUCENEPP_VERSION VERSION_LESS "${LUCENEPP_MIN_VERSION}")
|
||||
MESSAGE(ERROR " Lucene++ version ${LUCENEPP_VERSION} is less than the required minimum ${LUCENEPP_MIN_VERSION}")
|
||||
SET(LUCENEPP_GOOD_VERSION FALSE)
|
||||
ENDIF (LUCENEPP_VERSION STRLESS "${LUCENEPP_MIN_VERSION}")
|
||||
ENDIF (LUCENEPP_VERSION VERSION_LESS "${LUCENEPP_MIN_VERSION}")
|
||||
ENDIF (LUCENEPP_LIBRARY_DIR)
|
||||
|
||||
IF(LUCENEPP_INCLUDE_DIR AND LUCENEPP_LIBRARIES AND LUCENEPP_LIBRARY_DIR AND LUCENEPP_GOOD_VERSION)
|
||||
|
@@ -1,89 +0,0 @@
|
||||
# - Try to find the OggVorbis libraries
|
||||
# Once done this will define
|
||||
#
|
||||
# OGGVORBIS_FOUND - system has OggVorbis
|
||||
# OGGVORBIS_VERSION - set either to 1 or 2
|
||||
# OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory
|
||||
# OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis
|
||||
# OGG_LIBRARY - The Ogg library
|
||||
# VORBIS_LIBRARY - The Vorbis library
|
||||
# VORBISFILE_LIBRARY - The VorbisFile library
|
||||
# VORBISENC_LIBRARY - The VorbisEnc library
|
||||
|
||||
# Copyright (c) 2006, Richard Laerkaeng, <richard@goteborg.utfors.se>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
include (CheckLibraryExists)
|
||||
|
||||
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
|
||||
find_library(OGG_LIBRARY NAMES ogg)
|
||||
find_library(VORBIS_LIBRARY NAMES vorbis)
|
||||
find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
|
||||
find_library(VORBISENC_LIBRARY NAMES vorbisenc)
|
||||
|
||||
mark_as_advanced(VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR
|
||||
OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY)
|
||||
|
||||
|
||||
if (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
|
||||
set(OGGVORBIS_FOUND TRUE)
|
||||
|
||||
set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY})
|
||||
|
||||
set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES})
|
||||
check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})
|
||||
|
||||
if (HAVE_LIBVORBISENC2)
|
||||
set (OGGVORBIS_VERSION 2)
|
||||
else (HAVE_LIBVORBISENC2)
|
||||
set (OGGVORBIS_VERSION 1)
|
||||
endif (HAVE_LIBVORBISENC2)
|
||||
|
||||
else (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
|
||||
set (OGGVORBIS_VERSION)
|
||||
set(OGGVORBIS_FOUND FALSE)
|
||||
endif (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
|
||||
|
||||
|
||||
if (OGGVORBIS_FOUND)
|
||||
if (NOT OggVorbis_FIND_QUIETLY)
|
||||
message(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}")
|
||||
endif (NOT OggVorbis_FIND_QUIETLY)
|
||||
else (OGGVORBIS_FOUND)
|
||||
if (OggVorbis_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find OggVorbis libraries")
|
||||
endif (OggVorbis_FIND_REQUIRED)
|
||||
if (NOT OggVorbis_FIND_QUITELY)
|
||||
message(STATUS "Could NOT find OggVorbis libraries")
|
||||
endif (NOT OggVorbis_FIND_QUITELY)
|
||||
endif (OGGVORBIS_FOUND)
|
||||
|
||||
#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H)
|
||||
#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG)
|
||||
#check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS)
|
||||
#check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE)
|
||||
#check_library_exists(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC)
|
||||
#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
|
||||
|
||||
#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
|
||||
# message(STATUS "Ogg/Vorbis found")
|
||||
# set (VORBIS_LIBS "-lvorbis -logg")
|
||||
# set (VORBISFILE_LIBS "-lvorbisfile")
|
||||
# set (VORBISENC_LIBS "-lvorbisenc")
|
||||
# set (OGGVORBIS_FOUND TRUE)
|
||||
# if (HAVE_LIBVORBISENC2)
|
||||
# set (HAVE_VORBIS 2)
|
||||
# else (HAVE_LIBVORBISENC2)
|
||||
# set (HAVE_VORBIS 1)
|
||||
# endif (HAVE_LIBVORBISENC2)
|
||||
#else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
|
||||
# message(STATUS "Ogg/Vorbis not found")
|
||||
#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
|
||||
|
@@ -1,29 +0,0 @@
|
||||
# Find QJSON - JSON handling library for Qt
|
||||
#
|
||||
# This module defines
|
||||
# QJSON_FOUND - whether the qsjon library was found
|
||||
# QJSON_LIBRARIES - the qjson library
|
||||
# QJSON_INCLUDE_DIR - the include path of the qjson library
|
||||
#
|
||||
|
||||
find_library (QJSON_LIBRARIES
|
||||
NAMES
|
||||
qjson
|
||||
PATHS
|
||||
${QJSON_LIBRARY_DIRS}
|
||||
${LIB_INSTALL_DIR}
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
find_path (QJSON_INCLUDE_DIR
|
||||
NAMES
|
||||
qjson/parser.h
|
||||
PATHS
|
||||
${QJSON_INCLUDE_DIRS}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
|
||||
|
@@ -5,22 +5,12 @@
|
||||
# QTSPARKLE_LIBRARY, the path to qtsparkle
|
||||
# QTSPARKLE_FOUND, whether qtsparkle was found
|
||||
|
||||
if( TOMAHAWK_QT5 )
|
||||
set(QTSPARKLE_SUFFIX "-qt5")
|
||||
else()
|
||||
set(QTSPARKLE_SUFFIX "")
|
||||
endif()
|
||||
|
||||
FIND_PATH(QTSPARKLE_INCLUDE_DIR NAMES qtsparkle${QTSPARKLE_SUFFIX}/Updater
|
||||
HINTS
|
||||
${CMAKE_INSTALL_INCLUDEDIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
FIND_PATH(QTSPARKLE_INCLUDE_DIR NAMES qtsparkle-qt5/Updater
|
||||
HINTS ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(QTSPARKLE_LIBRARIES NAMES qtsparkle${QTSPARKLE_SUFFIX}
|
||||
HINTS
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
${KDE4_LIB_DIR}
|
||||
FIND_LIBRARY(QTSPARKLE_LIBRARIES NAMES qtsparkle-qt5
|
||||
HINTS ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
@@ -9,18 +9,15 @@ IF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
|
||||
# in cache already
|
||||
SET(QUAZIP_FOUND TRUE)
|
||||
ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
|
||||
IF (Qt5Core_FOUND)
|
||||
set(QUAZIP_LIB_VERSION_SUFFIX 5)
|
||||
ENDIF()
|
||||
IF (WIN32)
|
||||
FIND_PATH(QUAZIP_LIBRARY_DIR
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll
|
||||
NAMES libquazip5.dll
|
||||
HINTS "C:/Programme/" "C:/Program Files"
|
||||
PATH_SUFFIXES QuaZip/lib
|
||||
)
|
||||
FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll HINTS ${QUAZIP_LIBRARY_DIR})
|
||||
FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip${QUAZIP_LIB_VERSION_SUFFIX})
|
||||
FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip5.dll HINTS ${QUAZIP_LIBRARY_DIR})
|
||||
FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip5)
|
||||
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR NAMES zlib.h)
|
||||
ELSE(WIN32)
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
@@ -28,12 +25,12 @@ ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
|
||||
pkg_check_modules(PC_QUAZIP quazip)
|
||||
FIND_LIBRARY(QUAZIP_LIBRARIES
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES quazip${QUAZIP_LIB_VERSION_SUFFIX}
|
||||
NAMES quazip5
|
||||
HINTS /usr/lib /usr/lib64
|
||||
)
|
||||
FIND_PATH(QUAZIP_INCLUDE_DIR quazip.h
|
||||
HINTS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES quazip${QUAZIP_LIB_VERSION_SUFFIX}
|
||||
PATH_SUFFIXES quazip5
|
||||
)
|
||||
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR zlib.h HINTS /usr/include /usr/local/include)
|
||||
ENDIF (WIN32)
|
||||
|
@@ -61,7 +61,6 @@ ELSE()
|
||||
tag.h
|
||||
PATH_SUFFIXES taglib
|
||||
PATHS
|
||||
${KDE4_INCLUDE_DIR}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
@@ -69,7 +68,6 @@ ELSE()
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES tag
|
||||
PATHS
|
||||
${KDE4_LIB_DIR}
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
@@ -2,25 +2,14 @@
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if( NOT BUILD_WITH_QT4 )
|
||||
find_package(TelepathyQt5 NO_MODULE)
|
||||
set(TelepathyQt_FOUND ${TelepathyQt5_FOUND})
|
||||
set(TELEPATHY_QT_VERSION ${TELEPATHY_QT5_VERSION})
|
||||
set(TELEPATHY_QT_INSTALL_DIR ${TELEPATHY_QT5_INSTALL_DIR})
|
||||
set(TELEPATHY_QT_INCLUDE_DIR ${TELEPATHY_QT5_INCLUDE_DIR})
|
||||
set(TELEPATHY_QT_LIB_DIR ${TELEPATHY_QT5_LIB_DIR})
|
||||
set(TELEPATHY_QT_SHARE_DIR ${TELEPATHY_QT5_SHARE_DIR})
|
||||
set(TELEPATHY_QT_LIBRARIES ${TELEPATHY_QT5_LIBRARIES})
|
||||
else()
|
||||
find_package(TelepathyQt4 NO_MODULE)
|
||||
set(TelepathyQt_FOUND ${TelepathyQt4_FOUND})
|
||||
set(TELEPATHY_QT_VERSION ${TELEPATHY_QT4_VERSION})
|
||||
set(TELEPATHY_QT_INSTALL_DIR ${TELEPATHY_QT4_INSTALL_DIR})
|
||||
set(TELEPATHY_QT_INCLUDE_DIR ${TELEPATHY_QT4_INCLUDE_DIR})
|
||||
set(TELEPATHY_QT_LIB_DIR ${TELEPATHY_QT4_LIB_DIR})
|
||||
set(TELEPATHY_QT_SHARE_DIR ${TELEPATHY_QT4_SHARE_DIR})
|
||||
set(TELEPATHY_QT_LIBRARIES ${TELEPATHY_QT4_LIBRARIES})
|
||||
endif()
|
||||
find_package(TelepathyQt5 NO_MODULE)
|
||||
set(TelepathyQt_FOUND ${TelepathyQt5_FOUND})
|
||||
set(TELEPATHY_QT_VERSION ${TELEPATHY_QT5_VERSION})
|
||||
set(TELEPATHY_QT_INSTALL_DIR ${TELEPATHY_QT5_INSTALL_DIR})
|
||||
set(TELEPATHY_QT_INCLUDE_DIR ${TELEPATHY_QT5_INCLUDE_DIR})
|
||||
set(TELEPATHY_QT_LIB_DIR ${TELEPATHY_QT5_LIB_DIR})
|
||||
set(TELEPATHY_QT_SHARE_DIR ${TELEPATHY_QT5_SHARE_DIR})
|
||||
set(TELEPATHY_QT_LIBRARIES ${TELEPATHY_QT5_LIBRARIES})
|
||||
|
||||
set(TELEPATHY_QT_FOUND ${TelepathyQt_FOUND})
|
||||
|
||||
|
@@ -1,182 +0,0 @@
|
||||
# - Define GNU standard installation directories
|
||||
# Provides install directory variables as defined for GNU software:
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
# Inclusion of this module defines the following variables:
|
||||
# CMAKE_INSTALL_<dir> - destination for files of a given type
|
||||
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
|
||||
# where <dir> is one of:
|
||||
# BINDIR - user executables (bin)
|
||||
# SBINDIR - system admin executables (sbin)
|
||||
# LIBEXECDIR - program executables (libexec)
|
||||
# SYSCONFDIR - read-only single-machine data (etc)
|
||||
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
|
||||
# LOCALSTATEDIR - modifiable single-machine data (var)
|
||||
# LIBDIR - object code libraries (lib or lib64)
|
||||
# INCLUDEDIR - C header files (include)
|
||||
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
|
||||
# DATAROOTDIR - read-only architecture-independent data root (share)
|
||||
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
|
||||
# INFODIR - info documentation (DATAROOTDIR/info)
|
||||
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
|
||||
# MANDIR - man documentation (DATAROOTDIR/man)
|
||||
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
|
||||
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
|
||||
# install() commands for the corresponding file type. If the includer does
|
||||
# not define a value the above-shown default will be used and the value will
|
||||
# appear in the cache for editing by the user.
|
||||
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
|
||||
# from the corresponding destination by prepending (if necessary) the value
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
# Copyright 2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
|
||||
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# Note that the future of multi-arch handling may be even
|
||||
# more complicated than that: http://wiki.debian.org/Multiarch
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND NOT CMAKE_CROSSCOMPILING
|
||||
AND NOT EXISTS "/etc/debian_version")
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
|
||||
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_INFODIR)
|
||||
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
|
||||
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
|
||||
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_MANDIR)
|
||||
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
|
||||
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_DOCDIR)
|
||||
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
|
||||
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
@@ -93,7 +93,7 @@ MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _
|
||||
FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
|
||||
|
||||
IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
|
||||
SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
|
||||
SET_PACKAGE_PROPERTIES("${_package}" PROPERTIES DESCRIPTION "\"${_description}\"" URL "${_url}" PURPOSE "\"${_comments}\"")
|
||||
ENDIF(COMMAND SET_PACKAGE_INFO)
|
||||
|
||||
ENDMACRO(MACRO_LOG_FEATURE)
|
||||
|
2
Docker/Docker.variables
Normal file
2
Docker/Docker.variables
Normal file
@@ -0,0 +1,2 @@
|
||||
DOCKER_IMAGE_NAME=tomahawkmusicplayer/ubuntu
|
||||
DOCKER_IMAGE_VER=latest
|
274
Docker/Dockerfile
Normal file
274
Docker/Dockerfile
Normal file
@@ -0,0 +1,274 @@
|
||||
FROM ubuntu:19.04 as base
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
curl \
|
||||
gnupg2 \
|
||||
gosu \
|
||||
wget \
|
||||
locales \
|
||||
git \
|
||||
subversion \
|
||||
make \
|
||||
pkg-config \
|
||||
unzip \
|
||||
xz-utils \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# LLVM/Clang
|
||||
ENV CLANG_VERSION=9
|
||||
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
||||
&& apt-add-repository "deb http://apt.llvm.org/disco/ llvm-toolchain-disco-$CLANG_VERSION main" \
|
||||
&& apt-get update && apt-get install -y \
|
||||
clang-$CLANG_VERSION \
|
||||
clang-tidy-$CLANG_VERSION \
|
||||
clang-format-$CLANG_VERSION \
|
||||
llvm-$CLANG_VERSION-dev \
|
||||
libclang-$CLANG_VERSION-dev \
|
||||
&& update-alternatives \
|
||||
--install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100 \
|
||||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION \
|
||||
--slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$CLANG_VERSION \
|
||||
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-$CLANG_VERSION
|
||||
|
||||
# GCC
|
||||
ENV GCC_VERSION=9
|
||||
RUN sudo apt-get update \
|
||||
&& sudo apt-get install -y --no-install-recommends \
|
||||
g++-$GCC_VERSION \
|
||||
gcc-$GCC_VERSION \
|
||||
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
|
||||
|
||||
# Tomahawk deps
|
||||
RUN sudo apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
cmake \
|
||||
libattica-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-thread-dev \
|
||||
libfftw3-dev \
|
||||
libgnutls28-dev \
|
||||
libgsasl7-dev \
|
||||
liblastfm-dev \
|
||||
liblastfm5-dev \
|
||||
liblucene++-dev \
|
||||
libphonon-dev \
|
||||
libphononexperimental-dev \
|
||||
libqca-qt5-2-dev \
|
||||
libqca2-dev \
|
||||
libqca2-plugins \
|
||||
libqjson-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libqt5webkit5\
|
||||
libsamplerate0-dev \
|
||||
libsparsehash-dev \
|
||||
libssl-dev \
|
||||
libtelepathy-qt5-dev \
|
||||
libvlc-dev \
|
||||
libvlccore-dev \
|
||||
libx11-dev \
|
||||
libz-dev \
|
||||
qt5-default \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone --depth 1 https://github.com/zaphoyd/websocketpp.git --branch master --single-branch websocketpp \
|
||||
&& mkdir websocketpp/build && cd websocketpp/build \
|
||||
&& cmake .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r websocketpp
|
||||
|
||||
RUN git clone --depth 1 https://github.com/frankosterfeld/qtkeychain.git --branch master --single-branch qtkeychain \
|
||||
&& mkdir qtkeychain/build && cd qtkeychain/build \
|
||||
&& cmake .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r qtkeychain
|
||||
|
||||
RUN git clone --depth 1 https://github.com/taglib/taglib.git --branch master --single-branch taglib \
|
||||
&& mkdir taglib/build && cd taglib/build \
|
||||
&& cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=ON .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r taglib
|
||||
|
||||
RUN git clone --depth 1 https://anongit.kde.org/extra-cmake-modules.git --branch master --single-branch ecm \
|
||||
&& mkdir ecm/build && cd ecm/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r ecm
|
||||
|
||||
RUN git clone --depth 1 https://github.com/KDE/attica.git --branch master --single-branch attica \
|
||||
&& mkdir attica/build && cd attica/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r attica
|
||||
|
||||
RUN git clone --depth 1 https://github.com/stachenov/quazip.git --branch master --single-branch quazip \
|
||||
&& mkdir quazip/build && cd quazip/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r quazip
|
||||
|
||||
RUN git clone --depth 1 https://github.com/euroelessar/jreen.git --branch master --single-branch jreen \
|
||||
&& mkdir jreen/build && cd jreen/build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& sudo cmake --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r jreen
|
||||
|
||||
# MXE deps
|
||||
RUN sudo apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
autoconf \
|
||||
automake \
|
||||
autopoint \
|
||||
bash \
|
||||
bison \
|
||||
bzip2 \
|
||||
flex \
|
||||
g++ \
|
||||
g++-multilib \
|
||||
gettext \
|
||||
git \
|
||||
gperf \
|
||||
intltool \
|
||||
libc6-dev-i386 \
|
||||
libgdk-pixbuf2.0-dev \
|
||||
libltdl-dev \
|
||||
libssl-dev \
|
||||
libtool-bin \
|
||||
libxml-parser-perl \
|
||||
lzip \
|
||||
make \
|
||||
openssl \
|
||||
p7zip-full \
|
||||
patch \
|
||||
perl \
|
||||
pkg-config \
|
||||
python \
|
||||
ruby \
|
||||
sed \
|
||||
unzip \
|
||||
wget \
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone --depth 1 https://github.com/mxe/mxe.git --branch master --single-branch mxe \
|
||||
&& sudo mv mxe /opt/mxe
|
||||
|
||||
ENV MXE_PATH=/opt/mxe
|
||||
ENV MXE_TOOLCHAIN="i686-w64-mingw32.shared"
|
||||
ENV MXE_CMAKE=i686-w64-mingw32.shared-cmake
|
||||
ENV MXE_PLUGINS=/opt/mxe/plugins/gcc9
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
qt5
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
qttools
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
boost
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
cc \
|
||||
qca \
|
||||
qtsparkle \
|
||||
nsis \
|
||||
liblastfm \
|
||||
libgsasl
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
qtwebkit \
|
||||
sparsehash
|
||||
|
||||
ENV PATH=/opt/mxe/usr/bin:$PATH
|
||||
RUN sudo chmod -R 777 /opt/mxe/.ccache
|
||||
|
||||
RUN git clone --depth 1 https://anongit.kde.org/extra-cmake-modules.git --branch master --single-branch ecm \
|
||||
&& mkdir ecm/build && cd ecm/build \
|
||||
&& $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r ecm
|
||||
|
||||
RUN git clone --depth 1 https://github.com/zaphoyd/websocketpp.git --branch master --single-branch websocketpp \
|
||||
&& mkdir websocketpp/build && cd websocketpp/build \
|
||||
&& $MXE_CMAKE .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r websocketpp
|
||||
|
||||
RUN git clone --depth 1 https://github.com/frankosterfeld/qtkeychain.git --branch master --single-branch qtkeychain \
|
||||
&& mkdir qtkeychain/build && cd qtkeychain/build \
|
||||
&& $MXE_CMAKE .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r qtkeychain
|
||||
|
||||
RUN git clone --depth 1 https://github.com/taglib/taglib.git --branch master --single-branch taglib \
|
||||
&& mkdir taglib/build && cd taglib/build \
|
||||
&& $MXE_CMAKE -DCMAKE_INSTALL_PREFIX=/opt/mxe/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=ON .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r taglib
|
||||
|
||||
RUN git clone --depth 1 https://github.com/KDE/attica.git --branch master --single-branch attica \
|
||||
&& mkdir attica/build && cd attica/build \
|
||||
&& $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r attica
|
||||
|
||||
RUN git clone --depth 1 https://github.com/stachenov/quazip.git --branch master --single-branch quazip \
|
||||
&& mkdir quazip/build && cd quazip/build \
|
||||
&& $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r quazip
|
||||
|
||||
#RUN git clone --depth 1 https://github.com/euroelessar/jreen.git --branch master --single-branch jreen \
|
||||
# && mkdir jreen/build && cd jreen/build \
|
||||
# && $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
# && $MXE_CMAKE -build . -j 16 --target install \
|
||||
# && cd ../.. \
|
||||
# && rm -r jreen
|
||||
|
||||
# Language
|
||||
ENV LANG=en_US.UTF-8
|
||||
RUN echo "$LANG UTF-8" > /etc/locale.gen && locale-gen $LANG && update-locale LANG=$LANG
|
||||
|
||||
#entrypoint, if it is last here makes it easy to build new image without rebuilding all layers
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY build-and-test.sh /usr/local/bin/build-and-test.sh
|
||||
RUN chmod +x /usr/local/bin/build-and-test.sh
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
WORKDIR /tmp/workspace
|
8
Docker/build-and-test.sh
Executable file
8
Docker/build-and-test.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Debug} ..
|
||||
ninja
|
||||
ninja install
|
||||
env CTEST_OUTPUT_ON_FAILURE=1 ninja test
|
79
Docker/docker-commands.sh
Executable file
79
Docker/docker-commands.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
|
||||
get_repository_root(){
|
||||
local REPOSITORY_ROOT="$(git rev-parse --show-toplevel)"
|
||||
echo "$REPOSITORY_ROOT"
|
||||
}
|
||||
|
||||
get_repository_subdir(){
|
||||
REPOSITORY_ROOT=$(get_repository_root)
|
||||
CUR_DIR=$(pwd)
|
||||
SUB_DIR=$(echo "$CUR_DIR" | grep -oP "^$REPOSITORY_ROOT\K.*")
|
||||
echo "$SUB_DIR"
|
||||
}
|
||||
|
||||
# Run commands inside docker container
|
||||
_docker_run() {
|
||||
REPOSITORY_ROOT=$(get_repository_root)
|
||||
SUB_DIR=$(get_repository_subdir)
|
||||
|
||||
echo "SUB_DIR: " "$SUB_DIR"
|
||||
|
||||
source $REPOSITORY_ROOT/Docker/Docker.variables
|
||||
echo "Starting container: " "$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER"
|
||||
|
||||
echo "Got command: " "$*"
|
||||
USER_ID=$(id -u $USER)
|
||||
echo "Using USER_ID:" $USER_ID
|
||||
|
||||
docker run --env LOCAL_USER_ID=$USER_ID \
|
||||
--rm \
|
||||
--volume $REPOSITORY_ROOT:/tmp/workspace \
|
||||
--workdir /tmp/workspace$SUB_DIR \
|
||||
--env "TERM=xterm-256color" \
|
||||
--tty \
|
||||
--privileged \
|
||||
"$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER" \
|
||||
$*
|
||||
}
|
||||
|
||||
# 1st command: Run make target inside docker
|
||||
docker-make() {
|
||||
_docker_run make "${@}"
|
||||
}
|
||||
|
||||
# 2nd command: Run bash command inside docker
|
||||
docker-run() {
|
||||
_docker_run "${@}"
|
||||
}
|
||||
|
||||
# 3rd command: Run bash interactive inside docker
|
||||
docker-interactive() {
|
||||
REPOSITORY_ROOT=$(get_repository_root)
|
||||
SUB_DIR=$(get_repository_subdir)
|
||||
|
||||
echo "SUB_DIR: " "$SUB_DIR"
|
||||
|
||||
source $REPOSITORY_ROOT/Docker/Docker.variables
|
||||
echo "Starting container: " "$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER"
|
||||
|
||||
echo "Got command: " "$*"
|
||||
USER_ID=$(id -u $USER)
|
||||
echo "Using USER_ID:" $USER_ID
|
||||
|
||||
docker run --env LOCAL_USER_ID=$USER_ID \
|
||||
--rm \
|
||||
--interactive \
|
||||
--volume $REPOSITORY_ROOT:/tmp/workspace \
|
||||
--workdir /tmp/workspace$SUB_DIR \
|
||||
--env "TERM=xterm-256color" \
|
||||
--tty \
|
||||
"$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VER" /bin/bash
|
||||
}
|
||||
|
||||
docker-help() {
|
||||
echo "docker-make - Run a make target inside docker container"
|
||||
echo "docker-run - Run a specific bash command inside docker container and remove container on exit"
|
||||
echo "docker-interactive - Start an interactive bash session inside docker container and remove it on exit"
|
||||
echo "docker-help - Show this help text"
|
||||
}
|
32
Docker/entrypoint.sh
Executable file
32
Docker/entrypoint.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add local user
|
||||
# Either use the LOCAL_USER_ID if passed in at runtime or
|
||||
# fallback
|
||||
USER_ID=${LOCAL_USER_ID:-9001}
|
||||
USER=docker
|
||||
UPWD=Docker!
|
||||
|
||||
echo "Starting with USER: $USER and UID : $USER_ID"
|
||||
useradd --shell /bin/bash -u $USER_ID -o -c "docker user" -m "$USER"
|
||||
export HOME=/home/$USER
|
||||
|
||||
# Add user to sudoers
|
||||
echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/10-installer
|
||||
# Add root password
|
||||
echo "root":$UPWD | chpasswd
|
||||
# Add user password
|
||||
echo "$USER:$UPWD" | chpasswd
|
||||
|
||||
if [ -z "$CLANG_VERSION" ]; then
|
||||
echo "No CLANG_VERSION set"
|
||||
else
|
||||
echo "alias clang=clang-$CLANG_VERSION" >> $HOME/.bashrc
|
||||
echo "alias clang-tidy=clang-tidy-$CLANG_VERSION" >> $HOME/.bashrc
|
||||
echo "alias clang-format=clang-format-$CLANG_VERSION" >> $HOME/.bashrc
|
||||
fi
|
||||
|
||||
export PATH=/opt/mxe/usr/bin:$PATH
|
||||
|
||||
# Startup user
|
||||
exec gosu "$USER" "$@"
|
@@ -39,18 +39,10 @@ Tomahawk provides some tools that help highlight where crashes (of course we onl
|
||||
|
||||
Build the account plugin for Hatchet (http://hatchet.is). Requires [websocketpp](https://github.com/zaphoyd/websocketpp).
|
||||
|
||||
##### ```BUILD_WITH_QT4``` (boolean) (default: ON)
|
||||
|
||||
This enforces CMake to link against Qt4 regardless of whether Qt5 was found or not. Currently Qt4 is still our main development target, so this is still recommended. If you feel adventurous or are preparing Qt5 repositories for your distribution, feel free to give ```-DBUILD_WITH_QT4=OFF``` a shot.
|
||||
|
||||
##### ```WITH_CRASHREPORTER``` (boolean) (default: ON)
|
||||
|
||||
The crash reporter is built by default if libcrashreporter-qt is available in ```thirdparty/libcrashreporter-qt/``` (for example via git submodule). Usually distributions don't allow packagers to upload debug symbols to the Tomahawk HQ so to give crash reports more meaning for us, that's why we have no standardised submit process in place yet. If you can do that in your distribution, please get in touch with us!
|
||||
|
||||
##### ```WITH_KDE``` (boolean) (default: ON)
|
||||
|
||||
The KDE Telepathy plugin to configure Telepathy accounts from our Telepathy plugin can be disabled, if for some reason KDE is available in your build environment but you don't need this plugin.
|
||||
|
||||
##### ```WITH_UPOWER``` (boolean) (default on Linux: ON)
|
||||
|
||||
Build with support for UPower events.
|
||||
|
10
README.md
10
README.md
@@ -1,3 +1,7 @@
|
||||
# This project is essentially abandoned
|
||||
There is no one working on it.
|
||||
There isn't much sense in adding any new issues in the issue tracker unless you want to fix them yourself.
|
||||
|
||||
# WHAT TOMAHAWK IS
|
||||
|
||||
Tomahawk is a free multi-source and cross-platform music player. An application that can play not only your local files, but also stream from services like Spotify, Beats, SoundCloud, Google Music, YouTube and many others. You can even connect with your friends' Tomahawks, share your musical gems or listen along with them. Let the music play!
|
||||
@@ -73,7 +77,7 @@ You can download one of our nightly or stable builds:
|
||||
Required dependencies:
|
||||
|
||||
* [CMake 3](http://www.cmake.org/)
|
||||
* [Qt 5.4.0](http://qt-project.org/)
|
||||
* [Qt >= 5.4.0](http://qt-project.org/)
|
||||
* [VLC 2.1.0](https://videolan.org/vlc/)
|
||||
* [SQLite 3.6.22](http://www.sqlite.org/)
|
||||
* [TagLib 1.8](https://taglib.github.io/)
|
||||
@@ -86,6 +90,10 @@ Required dependencies:
|
||||
* [Sparsehash](https://code.google.com/p/sparsehash/)
|
||||
* [GnuTLS](http://gnutls.org/)
|
||||
|
||||
If you are using Qt>5.6 you need to build and install QtWebKit
|
||||
|
||||
* [QtWebKit](https://github.com/qt/qtwebkit)
|
||||
|
||||
The following dependencies are optional (but *recommended*):
|
||||
|
||||
* [Jreen 1.1.1](http://qutim.org/jreen/)
|
||||
|
@@ -25,13 +25,13 @@ function(tomahawk_add_library)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
if(LIBRARY_UI)
|
||||
qt_wrap_ui(LIBRARY_UI_SOURCES ${LIBRARY_UI})
|
||||
qt5_wrap_ui(LIBRARY_UI_SOURCES ${LIBRARY_UI})
|
||||
list(APPEND LIBRARY_SOURCES ${LIBRARY_UI_SOURCES})
|
||||
endif()
|
||||
|
||||
# add resources from current dir
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/resources.qrc")
|
||||
qt_add_resources(LIBRARY_RC_SOURCES "resources.qrc")
|
||||
qt5_add_resources(LIBRARY_RC_SOURCES "resources.qrc")
|
||||
list(APPEND LIBRARY_SOURCES ${LIBRARY_RC_SOURCES})
|
||||
unset(LIBRARY_RC_SOURCES)
|
||||
endif()
|
||||
@@ -45,9 +45,6 @@ function(tomahawk_add_library)
|
||||
add_library(${target} SHARED ${LIBRARY_SOURCES})
|
||||
endif()
|
||||
|
||||
# HACK: add qt modules - every lib should define its own set of modules
|
||||
qt5_use_modules(${target} Core Network Widgets Sql Xml ${LIBRARY_QT5_MODULES})
|
||||
|
||||
# definitions - can this be moved into set_target_properties below?
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
set_target_properties(${target} PROPERTIES AUTOMOC TRUE)
|
||||
@@ -70,12 +67,12 @@ function(tomahawk_add_library)
|
||||
endif()
|
||||
|
||||
# add link targets
|
||||
target_link_libraries(${target} ${TOMAHAWK_LIBRARIES})
|
||||
target_link_libraries(${target} PRIVATE ${TOMAHAWK_LIBRARIES})
|
||||
if(LIBRARY_LINK_LIBRARIES)
|
||||
target_link_libraries(${target} ${LIBRARY_LINK_LIBRARIES})
|
||||
target_link_libraries(${target} PUBLIC ${LIBRARY_LINK_LIBRARIES})
|
||||
endif()
|
||||
if(LIBRARY_LINK_PRIVATE_LIBRARIES)
|
||||
target_link_libraries(${target} LINK_PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})
|
||||
target_link_libraries(${target} PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# add soversion
|
||||
|
@@ -1,103 +1,3 @@
|
||||
#FIXME: this duplicates top level cmakelists: how can we reduce code duplication?
|
||||
|
||||
set( TOMAHAWK_QT5 @TOMAHAWK_QT5@ )
|
||||
|
||||
if(TOMAHAWK_QT5)
|
||||
# CMAKE 2.8.13+/3.0.0+ requires these for IMPORTed targets
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5Sql REQUIRED)
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt5_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
macro(qt_add_translation)
|
||||
qt5_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
# We need this to find the paths to qdbusxml2cpp and co
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(Qt5WinExtras REQUIRED)
|
||||
endif()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt5_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
macro(qt_add_translation)
|
||||
qt5_add_translation(${ARGN})
|
||||
endmacro()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
macro(qt_add_dbus_interface)
|
||||
qt5_add_dbus_interface(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_adaptor)
|
||||
qt5_add_dbus_adaptor(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
macro(setup_qt)
|
||||
endmacro()
|
||||
|
||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||
#FIXME: CrashReporter depends on deprecated QHttp
|
||||
set(WITH_KDE4 OFF)
|
||||
|
||||
else(TOMAHAWK_QT5)
|
||||
find_package(Qt4 COMPONENTS QtNetwork QtCore QtGui QtSql REQUIRED)
|
||||
include( ${QT_USE_FILE} )
|
||||
|
||||
set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork")
|
||||
if(BUILD_GUI OR NOT DEFINED BUILD_GUI)
|
||||
list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" "QtSvg")
|
||||
endif()
|
||||
|
||||
find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS})
|
||||
include( ${QT_USE_FILE} )
|
||||
|
||||
macro(qt5_use_modules)
|
||||
endmacro()
|
||||
|
||||
macro(qt_wrap_ui)
|
||||
qt4_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt4_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_translation)
|
||||
qt4_add_translation(${ARGN})
|
||||
endmacro()
|
||||
endif(TOMAHAWK_QT5)
|
||||
|
||||
|
||||
if(NOT TOMAHAWK_CMAKE_DIR)
|
||||
set(TOMAHAWK_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif()
|
||||
|
@@ -1,12 +0,0 @@
|
||||
[Protocol]
|
||||
exec=/path/to/binary "%u"
|
||||
protocol=tomahawk
|
||||
input=none
|
||||
output=none
|
||||
helper=true
|
||||
listing=
|
||||
reading=false
|
||||
writing=false
|
||||
makedir=false
|
||||
deleting=false
|
||||
|
@@ -19,9 +19,11 @@ macro(add_tomahawk_translations language)
|
||||
set( tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</qresource>\n" )
|
||||
set( tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</RCC>\n" )
|
||||
|
||||
file( WRITE ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc "${tomahawk_i18n_qrc_content}" )
|
||||
# Write file and configure it aferwards to make it a BYPRODUCT: https://gitlab.kitware.com/cmake/cmake/issues/16367
|
||||
file( WRITE ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc.in "${tomahawk_i18n_qrc_content}" )
|
||||
configure_file(${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc.in ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc COPYONLY)
|
||||
|
||||
qt_add_translation(QM_FILES ${TS_FILES})
|
||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
||||
|
||||
## HACK HACK HACK - around rcc limitations to allow out of source-tree building
|
||||
set( trans_file tomahawk_i18n )
|
||||
|
@@ -1,7 +1,5 @@
|
||||
include( ${PROJECT_BINARY_DIR}/TomahawkUse.cmake )
|
||||
|
||||
setup_qt()
|
||||
|
||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/libtomahawk )
|
||||
include_directories( ${CMAKE_CURRENT_LIST_DIR}/libtomahawk )
|
||||
|
||||
|
@@ -25,11 +25,6 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "TomahawkSettings.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Source.h"
|
||||
#endif
|
||||
|
||||
|
||||
// remove now playing status after PAUSE_TIMEOUT seconds
|
||||
static const int PAUSE_TIMEOUT = 10;
|
||||
|
@@ -66,29 +66,6 @@ using namespace Accounts;
|
||||
#define TOMAHAWK_CAP_NODE_NAME QLatin1String( "http://tomahawk-player.org/" )
|
||||
|
||||
|
||||
#if QT_VERSION <= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
void
|
||||
JreenMessageHandler( QtMsgType type, const char *msg )
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
case QtDebugMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Debug:" << msg;
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Warning:" << msg;
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Critical:" << msg;
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ":" << "Fatal:" << msg;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
XmppSipPlugin::XmppSipPlugin( Account* account )
|
||||
: SipPlugin( account )
|
||||
, m_state( Account::Disconnected )
|
||||
@@ -96,9 +73,6 @@ XmppSipPlugin::XmppSipPlugin( Account* account )
|
||||
, m_xmlConsole( nullptr )
|
||||
, m_pubSubManager( nullptr )
|
||||
{
|
||||
#if QT_VERSION <= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
Jreen::Logger::addHandler( JreenMessageHandler );
|
||||
#endif
|
||||
|
||||
m_currentUsername = readUsername();
|
||||
m_currentServer = readServer();
|
||||
|
@@ -3,13 +3,11 @@ cmake_policy(SET CMP0017 NEW)
|
||||
|
||||
set(TOMAHAWK_CRASH_REPORTER_TARGET ${TOMAHAWK_BASE_TARGET_NAME}_crash_reporter)
|
||||
|
||||
setup_qt()
|
||||
|
||||
list(APPEND crashreporter_SOURCES main.cpp)
|
||||
list(APPEND crashreporter_RC resources.qrc)
|
||||
|
||||
qt_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
|
||||
qt_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
|
||||
qt5_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
|
||||
qt5_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
|
||||
|
||||
|
||||
if(BUILD_RELEASE)
|
||||
@@ -43,7 +41,7 @@ target_link_libraries( ${TOMAHAWK_CRASH_REPORTER_TARGET}
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
target_link_libraries(${TOMAHAWK_CRASH_REPORTER_TARGET} Qt5::Widgets Qt5::Network)
|
||||
|
||||
set_target_properties(${TOMAHAWK_CRASH_REPORTER_TARGET} PROPERTIES AUTOMOC ON)
|
||||
install(TARGETS ${TOMAHAWK_CRASH_REPORTER_TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
||||
|
||||
qt5_use_modules(${TOMAHAWK_CRASH_REPORTER_TARGET} Widgets Network)
|
||||
|
@@ -23,11 +23,7 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/NetworkAccessManager.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/ArtistTypes.h>
|
||||
#else
|
||||
#include <echonest/ArtistTypes.h>
|
||||
#endif
|
||||
|
||||
#include <QNetworkConfiguration>
|
||||
|
||||
|
@@ -25,11 +25,7 @@
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "infosystem/InfoSystemWorker.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Artist.h>
|
||||
#else
|
||||
#include <echonest/Artist.h>
|
||||
#endif
|
||||
|
||||
#include <QObject>
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/NetworkAccessManager.h"
|
||||
#include "TomahawkVersion.h"
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QDomDocument>
|
||||
@@ -88,6 +89,16 @@ MusicBrainzPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
}
|
||||
}
|
||||
|
||||
QNetworkReply*
|
||||
MusicBrainzPlugin::getUrl(QUrl url, QVariant requestData)
|
||||
{
|
||||
QNetworkRequest request = QNetworkRequest( url );
|
||||
QByteArray userAgent = TomahawkUtils::userAgentString( TOMAHAWK_APPLICATION_NAME, TOMAHAWK_VERSION ).toUtf8();
|
||||
request.setRawHeader( "User-Agent", userAgent );
|
||||
QNetworkReply* reply = Tomahawk::Utils::nam()->get( request );
|
||||
reply->setProperty( "requestData", requestData );
|
||||
return reply;
|
||||
}
|
||||
|
||||
void
|
||||
MusicBrainzPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requestData )
|
||||
@@ -111,8 +122,7 @@ MusicBrainzPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requ
|
||||
TomahawkUtils::urlAddQueryItem( url, "limit", "100" );
|
||||
|
||||
tDebug() << Q_FUNC_INFO << url.toString();
|
||||
QNetworkReply* reply = Tomahawk::Utils::nam()->get( QNetworkRequest( url ) );
|
||||
reply->setProperty( "requestData", QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
QNetworkReply* reply = getUrl( url, QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
|
||||
connect( reply, SIGNAL( finished() ), SLOT( gotReleaseGroupsSlot() ) );
|
||||
|
||||
@@ -131,8 +141,7 @@ MusicBrainzPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requ
|
||||
TomahawkUtils::urlAddQueryItem( url, "limit", "100" );
|
||||
|
||||
tDebug() << Q_FUNC_INFO << url.toString();
|
||||
QNetworkReply* reply = Tomahawk::Utils::nam()->get( QNetworkRequest( url ) );
|
||||
reply->setProperty( "requestData", QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
QNetworkReply* reply = getUrl( url, QVariant::fromValue< Tomahawk::InfoSystem::InfoRequestData >( requestData ) );
|
||||
|
||||
connect( reply, SIGNAL( finished() ), SLOT( gotReleasesSlot() ) );
|
||||
|
||||
@@ -154,6 +163,7 @@ MusicBrainzPlugin::gotReleaseGroupsSlot()
|
||||
if ( !oldReply )
|
||||
return; //timeout will handle it
|
||||
oldReply->deleteLater();
|
||||
tDebug() << Q_FUNC_INFO << "HTTP response code:" << oldReply->attribute( QNetworkRequest::HttpStatusCodeAttribute ).toInt();
|
||||
|
||||
QDomDocument doc;
|
||||
doc.setContent( oldReply->readAll() );
|
||||
@@ -237,8 +247,7 @@ MusicBrainzPlugin::gotReleasesSlot()
|
||||
TomahawkUtils::urlAddQueryItem( url, "inc", "recordings" );
|
||||
tDebug() << Q_FUNC_INFO << url.toString();
|
||||
|
||||
QNetworkReply* newReply = Tomahawk::Utils::nam()->get( QNetworkRequest( url ) );
|
||||
newReply->setProperty( "requestData", oldReply->property( "requestData" ) );
|
||||
QNetworkReply* newReply = getUrl( url, oldReply->property( "requestData" ) );
|
||||
connect( newReply, SIGNAL( finished() ), SLOT( gotRecordingsSlot() ) );
|
||||
|
||||
break;
|
||||
@@ -261,6 +270,8 @@ MusicBrainzPlugin::gotRecordingsSlot()
|
||||
return; //timeout will handle it
|
||||
reply->deleteLater();
|
||||
|
||||
tDebug() << Q_FUNC_INFO << "HTTP response code:" << reply->attribute( QNetworkRequest::HttpStatusCodeAttribute ).toInt();
|
||||
|
||||
QDomDocument doc;
|
||||
doc.setContent( reply->readAll() );
|
||||
QDomNodeList mediumList = doc.elementsByTagName( "medium-list" );
|
||||
|
@@ -59,6 +59,7 @@ private slots:
|
||||
void gotReleaseGroupsSlot();
|
||||
void gotReleasesSlot();
|
||||
void gotRecordingsSlot();
|
||||
QNetworkReply* getUrl( QUrl url, QVariant requestData );
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -2,13 +2,14 @@ SET(fdo_srcs
|
||||
fdonotify/FdoNotifyPlugin.cpp
|
||||
fdonotify/ImageConverter.cpp
|
||||
)
|
||||
SET(FDO_LINK_LIBRARIES ${LINK_LIBRARIES})
|
||||
qt_add_dbus_interface(fdo_srcs fdonotify/org.freedesktop.Notifications.xml
|
||||
SET(FDO_LINK_LIBRARIES ${LINK_LIBRARIES} Qt5::DBus)
|
||||
qt5_add_dbus_interface(fdo_srcs fdonotify/org.freedesktop.Notifications.xml
|
||||
FreedesktopNotificationsProxy)
|
||||
|
||||
tomahawk_add_plugin(fdonotify
|
||||
TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO
|
||||
SOURCES "${fdo_srcs}" LINK_LIBRARIES "${FDO_LINK_LIBRARIES}"
|
||||
SOURCES "${fdo_srcs}"
|
||||
LINK_LIBRARIES "${FDO_LINK_LIBRARIES}"
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
@@ -16,9 +17,9 @@ SET(mpris_srcs
|
||||
mpris/MprisPlugin.cpp
|
||||
)
|
||||
|
||||
qt_add_dbus_adaptor(mpris_srcs mpris/MprisPluginRootAdaptor.xml
|
||||
qt5_add_dbus_adaptor(mpris_srcs mpris/MprisPluginRootAdaptor.xml
|
||||
mpris/MprisPlugin.h Tomahawk::InfoSystem::MprisPlugin MprisPluginRootAdaptor MprisPluginRootAdaptor)
|
||||
qt_add_dbus_adaptor(mpris_srcs mpris/MprisPluginPlayerAdaptor.xml
|
||||
qt5_add_dbus_adaptor(mpris_srcs mpris/MprisPluginPlayerAdaptor.xml
|
||||
mpris/MprisPlugin.h Tomahawk::InfoSystem::MprisPlugin MprisPluginPlayerAdaptor MprisPluginPlayerAdaptor)
|
||||
|
||||
tomahawk_add_plugin(mpris
|
||||
|
@@ -55,11 +55,6 @@
|
||||
#include <QDBusPendingCallWatcher>
|
||||
#include <QImage>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
// QTextDocument provides Qt::escape()
|
||||
#include <QTextDocument>
|
||||
#endif
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
@@ -67,11 +62,7 @@ namespace InfoSystem
|
||||
{
|
||||
|
||||
QString escapeHtml( const QString& str ) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return str.toHtmlEscaped();
|
||||
#else
|
||||
return Qt::escape( str );
|
||||
#endif
|
||||
}
|
||||
|
||||
FdoNotifyPlugin::FdoNotifyPlugin()
|
||||
|
@@ -27,12 +27,6 @@
|
||||
|
||||
#include "../../InfoPluginDllMacro.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "PlaylistInterface.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
@@ -64,7 +64,7 @@ PlaylistDelegate::PlaylistDelegate()
|
||||
void
|
||||
PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, QModelIndex() );
|
||||
qApp->style()->drawControl( QStyle::CE_ItemViewItem, &opt, painter );
|
||||
|
||||
|
@@ -30,11 +30,6 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Query.h"
|
||||
#endif
|
||||
|
||||
|
||||
ActionCollection* ActionCollection::s_instance = 0;
|
||||
ActionCollection* ActionCollection::instance()
|
||||
|
@@ -25,11 +25,6 @@
|
||||
#include <QPixmap>
|
||||
#include <QFuture>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#endif
|
||||
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "DllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
|
@@ -173,14 +173,6 @@ if(QCA2_FOUND)
|
||||
set( libGuiSources ${libGuiSources} utils/GroovesharkParser.cpp )
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT Qt5Core_DIR)
|
||||
if(BUILD_GUI AND X11_FOUND)
|
||||
include_directories( ${THIRDPARTY_DIR}/libqnetwm )
|
||||
list(APPEND libSources ${libSources} ${THIRDPARTY_DIR}/libqnetwm/libqnetwm/netwm.cpp)
|
||||
list(APPEND LINK_LIBRARIES ${X11_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND libSources
|
||||
TomahawkSettings.cpp
|
||||
SourceList.cpp
|
||||
@@ -422,9 +414,7 @@ IF(LIBATTICA_FOUND)
|
||||
SET( libGuiSources ${libGuiSources} AtticaManager.cpp )
|
||||
INCLUDE_DIRECTORIES( ${LIBATTICA_INCLUDE_DIR} )
|
||||
LIST(APPEND PRIVATE_LINK_LIBRARIES ${LIBATTICA_LIBRARIES} ${LibAttica_LIBRARIES} ${QUAZIP_LIBRARIES})
|
||||
IF( TOMAHAWK_QT5 )
|
||||
LIST(APPEND LINK_LIBRARIES KF5::Attica )
|
||||
ENDIF( TOMAHAWK_QT5 )
|
||||
LIST(APPEND LINK_LIBRARIES KF5::Attica)
|
||||
ENDIF(LIBATTICA_FOUND)
|
||||
|
||||
if(HAVE_X11)
|
||||
@@ -486,7 +476,7 @@ IF(BUILD_GUI)
|
||||
LIST(APPEND libSources ${libGuiSources} )
|
||||
ENDIF()
|
||||
|
||||
qt_wrap_ui(libUI_H ${libUI})
|
||||
qt5_wrap_ui(libUI_H ${libUI})
|
||||
|
||||
SET( libSources ${libSources} ${libUI_H} )
|
||||
|
||||
@@ -500,12 +490,12 @@ set_target_properties(
|
||||
OUTPUT_NAME ${TOMAHAWK_BASE_TARGET_NAME}
|
||||
)
|
||||
|
||||
|
||||
qt5_use_modules(${TOMAHAWK_LIBRARY} Widgets Network Sql WebKitWidgets Concurrent Xml UiTools Svg)
|
||||
IF(APPLE)
|
||||
qt5_use_modules(${TOMAHAWK_LIBRARY} MacExtras)
|
||||
ENDIF()
|
||||
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} PUBLIC
|
||||
Qt5::Widgets Qt5::Network Qt5::Sql Qt5::WebKitWidgets Qt5::Concurrent Qt5::Xml Qt5::UiTools Qt5::Svg
|
||||
)
|
||||
if(APPLE)
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} PRIVATE Qt5::MacExtras)
|
||||
endif()
|
||||
|
||||
IF(QCA2_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
||||
@@ -514,11 +504,9 @@ ENDIF(QCA2_FOUND)
|
||||
|
||||
IF( UNIX AND NOT APPLE )
|
||||
LIST(APPEND LINK_LIBRARIES ${QT_QTDBUS_LIBRARIES} )
|
||||
qt5_use_modules(${TOMAHAWK_LIBRARY} DBus)
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
|
||||
TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
||||
LINK_PRIVATE
|
||||
TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} PRIVATE
|
||||
${LIBVLC_LIBRARY}
|
||||
|
||||
# Thirdparty shipped with tomahawk
|
||||
@@ -526,7 +514,7 @@ TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
||||
${QTKEYCHAIN_LIBRARIES}
|
||||
${PRIVATE_LINK_LIBRARIES}
|
||||
|
||||
LINK_PUBLIC
|
||||
PUBLIC
|
||||
# External deps
|
||||
${QJSON_LIBRARIES}
|
||||
${LUCENEPP_LIBRARIES}
|
||||
|
@@ -34,13 +34,8 @@
|
||||
#include "TomahawkSettings.h"
|
||||
#include "Track.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/CatalogUpdateEntry.h>
|
||||
#include <echonest5/Config.h>
|
||||
#else
|
||||
#include <echonest/CatalogUpdateEntry.h>
|
||||
#include <echonest/Config.h>
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -22,11 +22,7 @@
|
||||
#include "DllMacro.h"
|
||||
#include "Query.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Catalog.h>
|
||||
#else
|
||||
#include <echonest/Catalog.h>
|
||||
#endif
|
||||
|
||||
#include <QObject>
|
||||
#include <QQueue>
|
||||
|
@@ -29,11 +29,6 @@
|
||||
|
||||
#include <QAction>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Result.h"
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -289,9 +289,4 @@ private:
|
||||
|
||||
Q_DECLARE_METATYPE( QSharedPointer< Tomahawk::Playlist > )
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
// Qt5 automatically generated this Metatype
|
||||
Q_DECLARE_METATYPE( QList< QSharedPointer< Tomahawk::Query > > )
|
||||
#endif
|
||||
|
||||
#endif // PLAYLIST_H
|
||||
|
@@ -1,13 +1,9 @@
|
||||
#include <QtPlugin>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#if defined(Q_EXPORT_PLUGIN)
|
||||
#undef Q_EXPORT_PLUGIN
|
||||
#undef Q_EXPORT_PLUGIN2
|
||||
#endif
|
||||
#if defined(Q_EXPORT_PLUGIN)
|
||||
#undef Q_EXPORT_PLUGIN
|
||||
#undef Q_EXPORT_PLUGIN2
|
||||
#endif
|
||||
|
||||
#define Q_EXPORT_PLUGIN(a)
|
||||
#define Q_EXPORT_PLUGIN2(a, b)
|
||||
#else
|
||||
# define Q_PLUGIN_METADATA(a)
|
||||
#endif
|
||||
#define Q_EXPORT_PLUGIN(a)
|
||||
#define Q_EXPORT_PLUGIN2(a, b)
|
||||
|
@@ -34,14 +34,8 @@
|
||||
#include "PlaylistInterface.h"
|
||||
#include "Source.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
#include <qtkeychain/keychain.h>
|
||||
#include <QDesktopServices>
|
||||
#else
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include <QStandardPaths>
|
||||
#endif
|
||||
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
|
||||
using namespace Tomahawk;
|
||||
@@ -733,11 +727,7 @@ TomahawkSettings::genericCacheVersion() const
|
||||
QString
|
||||
TomahawkSettings::storageCacheLocation() const
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return QStandardPaths::writableLocation( QStandardPaths::CacheLocation );
|
||||
#else
|
||||
return QDesktopServices::storageLocation( QDesktopServices::CacheLocation );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -746,11 +736,7 @@ TomahawkSettings::scannerPaths() const
|
||||
{
|
||||
QString musicLocation;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
musicLocation = QStandardPaths::writableLocation( QStandardPaths::MusicLocation );
|
||||
#else
|
||||
musicLocation = QDesktopServices::storageLocation( QDesktopServices::MusicLocation );
|
||||
#endif
|
||||
|
||||
return value( "scanner/paths", musicLocation ).toStringList();
|
||||
}
|
||||
|
@@ -213,19 +213,11 @@ Track::init()
|
||||
Q_D( Track );
|
||||
updateSortNames();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QObject::connect( d->trackData.data(), &TrackData::attributesLoaded, this, &Track::attributesLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::socialActionsLoaded, this, &Track::socialActionsLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::statsLoaded, this, &Track::statsLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::similarTracksLoaded, this, &Track::similarTracksLoaded );
|
||||
QObject::connect( d->trackData.data(), &TrackData::lyricsLoaded, this, &Track::lyricsLoaded );
|
||||
#else
|
||||
connect( d->trackData.data(), SIGNAL( attributesLoaded() ), SIGNAL( attributesLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( socialActionsLoaded() ), SIGNAL( socialActionsLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( statsLoaded() ), SIGNAL( statsLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( similarTracksLoaded() ), SIGNAL( similarTracksLoaded() ) );
|
||||
connect( d->trackData.data(), SIGNAL( lyricsLoaded() ), SIGNAL( lyricsLoaded() ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@@ -64,7 +64,7 @@ AccountDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex
|
||||
if ( m_accountRowHeight < 0 )
|
||||
{
|
||||
// Haven't calculated normal item height yet, do it once and save it
|
||||
QStyleOptionViewItemV4 opt( option );
|
||||
QStyleOptionViewItem opt( option );
|
||||
initStyleOption( &opt, index );
|
||||
m_accountRowHeight = ACCOUNT_DELEGATE_ROW_HEIGHT_MULTIPLIER * opt.fontMetrics.height();
|
||||
}
|
||||
@@ -98,7 +98,7 @@ AccountDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex
|
||||
void
|
||||
AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, index );
|
||||
|
||||
// draw the background
|
||||
@@ -139,7 +139,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
// draw checkbox first
|
||||
const int checkboxYPos = ( center ) - ( WRENCH_SIZE / 2 );
|
||||
QRect checkRect = QRect( leftEdge, checkboxYPos, WRENCH_SIZE, WRENCH_SIZE );
|
||||
QStyleOptionViewItemV4 opt2 = opt;
|
||||
QStyleOptionViewItem opt2 = opt;
|
||||
opt2.rect = checkRect;
|
||||
|
||||
if ( !m_loadingSpinners.contains( index ) )
|
||||
@@ -392,7 +392,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
|
||||
|
||||
int
|
||||
AccountDelegate::drawAccountList( QPainter* painter, QStyleOptionViewItemV4& opt, const QList< Account* > accts, int rightEdge ) const
|
||||
AccountDelegate::drawAccountList( QPainter* painter, QStyleOptionViewItem& opt, const QList< Account* > accts, int rightEdge ) const
|
||||
{
|
||||
// list each account name, and show the online, offline icon
|
||||
const int textHeight = painter->fontMetrics().height() + 1;
|
||||
@@ -615,7 +615,7 @@ AccountDelegate::drawStatus( QPainter* painter, const QPointF& rightTopEdge, Acc
|
||||
|
||||
|
||||
void
|
||||
AccountDelegate::drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const QWidget* w ) const
|
||||
AccountDelegate::drawCheckBox( QStyleOptionViewItem& opt, QPainter* p, const QWidget* w ) const
|
||||
{
|
||||
QStyle* style = w ? w->style() : QApplication::style();
|
||||
opt.checkState == Qt::Checked ? opt.state |= QStyle::State_On : opt.state |= QStyle::State_Off;
|
||||
@@ -624,7 +624,7 @@ AccountDelegate::drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const Q
|
||||
|
||||
|
||||
void
|
||||
AccountDelegate::drawConfigWrench ( QPainter* painter, QStyleOptionViewItemV4& opt, QStyleOptionToolButton& topt ) const
|
||||
AccountDelegate::drawConfigWrench ( QPainter* painter, QStyleOptionViewItem& opt, QStyleOptionToolButton& topt ) const
|
||||
{
|
||||
const QWidget* w = opt.widget;
|
||||
QStyle* style = w ? w->style() : QApplication::style();
|
||||
@@ -648,7 +648,7 @@ AccountDelegate::drawConfigWrench ( QPainter* painter, QStyleOptionViewItemV4& o
|
||||
QRect
|
||||
AccountDelegate::checkRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, idx );
|
||||
|
||||
// Top level item, return the corresponding rect
|
||||
@@ -661,7 +661,7 @@ AccountDelegate::checkRectForIndex( const QStyleOptionViewItem& option, const QM
|
||||
|
||||
|
||||
int
|
||||
AccountDelegate::removeBtnWidth( QStyleOptionViewItemV4 opt ) const
|
||||
AccountDelegate::removeBtnWidth( QStyleOptionViewItem opt ) const
|
||||
{
|
||||
const QString btnText = tr( "Remove" );
|
||||
QFont font = opt.font;
|
||||
@@ -674,7 +674,7 @@ void
|
||||
AccountDelegate::startInstalling( const QPersistentModelIndex& idx )
|
||||
{
|
||||
qDebug() << "START INSTALLING:" << idx.data( Qt::DisplayRole ).toString();
|
||||
QStyleOptionViewItemV4 opt;
|
||||
QStyleOptionViewItem opt;
|
||||
initStyleOption( &opt, idx );
|
||||
|
||||
AnimatedSpinner* anim = new AnimatedSpinner( checkRectForIndex( opt, idx ).size(), true );
|
||||
|
@@ -71,14 +71,14 @@ private:
|
||||
void drawRoundedButton( QPainter* painter, const QRect& buttonRect, bool red = false ) const;
|
||||
// Returns new left edge
|
||||
int drawStatus( QPainter* painter, const QPointF& rightTopEdge, Account* acct, bool drawText = false ) const;
|
||||
void drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const QWidget* w ) const;
|
||||
void drawConfigWrench( QPainter* painter, QStyleOptionViewItemV4& option, QStyleOptionToolButton& topt ) const;
|
||||
void drawCheckBox( QStyleOptionViewItem& opt, QPainter* p, const QWidget* w ) const;
|
||||
void drawConfigWrench( QPainter* painter, QStyleOptionViewItem& option, QStyleOptionToolButton& topt ) const;
|
||||
// returns new left edge
|
||||
int drawAccountList( QPainter* painter, QStyleOptionViewItemV4& option, const QList< Account* > accounts, int rightEdge ) const;
|
||||
int drawAccountList( QPainter* painter, QStyleOptionViewItem& option, const QList< Account* > accounts, int rightEdge ) const;
|
||||
|
||||
QRect checkRectForIndex( const QStyleOptionViewItem &option, const QModelIndex &idx ) const;
|
||||
|
||||
int removeBtnWidth( QStyleOptionViewItemV4 opt ) const;
|
||||
int removeBtnWidth( QStyleOptionViewItem opt ) const;
|
||||
|
||||
int m_hoveringOver;
|
||||
QPersistentModelIndex m_hoveringItem, m_configPressed;
|
||||
|
@@ -44,7 +44,7 @@ AccountFactoryWrapperDelegate::AccountFactoryWrapperDelegate( QObject* parent )
|
||||
void
|
||||
AccountFactoryWrapperDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, index );
|
||||
|
||||
const int center = opt.rect.height() / 2 + opt.rect.top();
|
||||
@@ -61,7 +61,7 @@ AccountFactoryWrapperDelegate::paint(QPainter* painter, const QStyleOptionViewIt
|
||||
// Checkbox on left edge, then text
|
||||
const QRect checkRect( PADDING/4, PADDING/4 + opt.rect.top(), opt.rect.height() - PADDING/4, opt.rect.height() - PADDING/4 );
|
||||
m_cachedCheckRects[ index ] = checkRect;
|
||||
QStyleOptionViewItemV4 opt2 = opt;
|
||||
QStyleOptionViewItem opt2 = opt;
|
||||
opt2.rect = checkRect;
|
||||
opt.checkState == Qt::Checked ? opt2.state |= QStyle::State_On : opt2.state |= QStyle::State_Off;
|
||||
style->drawPrimitive( QStyle::PE_IndicatorViewItemCheck, &opt2, painter, w );
|
||||
|
@@ -23,11 +23,7 @@
|
||||
#ifdef Q_OS_MAC
|
||||
#include "TomahawkSettings.h"
|
||||
#else
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
#include <qtkeychain/keychain.h>
|
||||
#else
|
||||
#include <qt5keychain/keychain.h>
|
||||
#endif
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include "utils/Json.h"
|
||||
#endif
|
||||
|
||||
|
@@ -11,16 +11,3 @@ tomahawk_add_plugin(telepathy
|
||||
${TELEPATHY_QT_LIBRARIES}
|
||||
SHARED_LIB
|
||||
)
|
||||
|
||||
if( KDE4_FOUND )
|
||||
include_directories( ${KDE4_INCLUDES} )
|
||||
tomahawk_add_plugin(kde
|
||||
TYPE configstorage_telepathy
|
||||
EXPORT_MACRO CONFIGSTORAGETELEPATHYDLLEXPORT_PRO
|
||||
SOURCES
|
||||
KdeTelepathyConfigWidget.cpp
|
||||
LINK_LIBRARIES
|
||||
${TOMAHAWK_BASE_TARGET_NAME}_configstorage_telepathy
|
||||
${KDE4_KCMUTILS_LIBS}
|
||||
)
|
||||
endif()
|
||||
|
@@ -1,46 +0,0 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2013, Dominik Schmidt <domme@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "KdeTelepathyConfigWidget.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <KCModuleProxy>
|
||||
|
||||
#include <QtPlugin>
|
||||
|
||||
QWidget*
|
||||
KdeTelepathyConfigWidget::configWidget()
|
||||
{
|
||||
KCModuleProxy* proxy = new KCModuleProxy( "kcm_ktp_accounts" );
|
||||
|
||||
if ( !proxy->aboutData() )
|
||||
{
|
||||
qWarning() << "Could not load kcm_ktp_accounts... ";
|
||||
|
||||
delete proxy;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return proxy;
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN2( TelepathyConfigStorageConfigWidgetPlugin, KdeTelepathyConfigWidget )
|
||||
|
||||
|
@@ -1,36 +0,0 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2013, Dominik Schmidt <domme@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KDETELEPATHYCONFIGWIDGET_H
|
||||
#define KDETELEPATHYCONFIGWIDGET_H
|
||||
|
||||
#include "TelepathyConfigStorageConfigWidgetPlugin.h"
|
||||
|
||||
#include "TelepathyConfigStorageConfigWidgetDllMacro.h"
|
||||
|
||||
class CONFIGSTORAGETELEPATHYDLLEXPORT KdeTelepathyConfigWidget : public TelepathyConfigStorageConfigWidgetPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES( TelepathyConfigStorageConfigWidgetPlugin )
|
||||
|
||||
public:
|
||||
virtual QWidget* configWidget();
|
||||
};
|
||||
|
||||
|
||||
#endif // KDETELEPATHYCONFIGWIDGET_H
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
@@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/telepathy">
|
||||
<file>kde.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
@@ -29,17 +29,10 @@
|
||||
#include "utils/Closure.h"
|
||||
#include "utils/NetworkAccessManager.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <lastfm5/ws.h>
|
||||
#include <lastfm5/User.h>
|
||||
#include <lastfm5/XmlQuery.h>
|
||||
#include <lastfm5/Track.h>
|
||||
#else
|
||||
#include <lastfm/ws.h>
|
||||
#include <lastfm/User.h>
|
||||
#include <lastfm/XmlQuery.h>
|
||||
#include <lastfm/Track.h>
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk::Accounts;
|
||||
|
||||
|
@@ -34,13 +34,8 @@
|
||||
#include "TomahawkSettings.h"
|
||||
#include "utils/NetworkAccessManager.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <lastfm5/ws.h>
|
||||
#include <lastfm5/XmlQuery.h>
|
||||
#else
|
||||
#include <lastfm/ws.h>
|
||||
#include <lastfm/XmlQuery.h>
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk::Accounts;
|
||||
using namespace Tomahawk::InfoSystem;
|
||||
|
@@ -24,15 +24,9 @@
|
||||
#include "infosystem/InfoSystemWorker.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <lastfm5/Track.h>
|
||||
#include <lastfm5/Audioscrobbler.h>
|
||||
#include <lastfm5/ScrobblePoint.h>
|
||||
#else
|
||||
#include <lastfm/Track.h>
|
||||
#include <lastfm/Audioscrobbler.h>
|
||||
#include <lastfm/ScrobblePoint.h>
|
||||
#endif
|
||||
|
||||
#include <QObject>
|
||||
|
||||
|
@@ -164,7 +164,6 @@ AudioOutput::AudioOutput( QObject* parent )
|
||||
setCurrentSource( new MediaStream( &m_silenceFile, true ) );
|
||||
libvlc_media_player_play( m_vlcPlayer );
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,4,0)
|
||||
// if the silence file did not play for 15 secs, we pretend the AudioOutput is initialized, to allow proper error reporting
|
||||
QTimer::singleShot( 15000, [&]()
|
||||
{
|
||||
@@ -173,7 +172,6 @@ AudioOutput::AudioOutput( QObject* parent )
|
||||
emit initialized();
|
||||
}
|
||||
} );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@@ -43,11 +43,6 @@
|
||||
#include "DatabaseCommand_SetCollectionAttributes.h"
|
||||
#include "DatabaseCommand_SetTrackAttributes.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_WORKER_THREADS 4
|
||||
#define MAX_WORKER_THREADS 16
|
||||
|
||||
|
@@ -25,11 +25,6 @@
|
||||
#include "PlaylistEntry.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -24,10 +24,6 @@
|
||||
|
||||
#include <QSqlQuery>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -21,11 +21,6 @@
|
||||
#include "Query.h"
|
||||
#include "Track.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Source.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
@@ -87,9 +87,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
// Qt5 automatically generated this Metatype
|
||||
Q_DECLARE_METATYPE(QList<QStringList>)
|
||||
#endif
|
||||
|
||||
#endif // DATABASECOMMAND_GENERICSELECT_H
|
||||
|
@@ -21,11 +21,6 @@
|
||||
#include "Query.h"
|
||||
#include "Track.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Source.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
@@ -22,11 +22,6 @@
|
||||
#include "DatabaseImpl.h"
|
||||
#include "TomahawkSqlQuery.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Source.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
@@ -25,10 +25,6 @@
|
||||
#include "PlaylistEntry.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -54,7 +54,7 @@ ACLJobDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
if ( !item )
|
||||
return;
|
||||
//tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, index );
|
||||
QFontMetrics fm( opt.font );
|
||||
|
||||
|
@@ -29,11 +29,6 @@
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Source.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
InboxJobItem::InboxJobItem( Side side,
|
||||
|
@@ -47,7 +47,7 @@ JobStatusDelegate::~JobStatusDelegate()
|
||||
void
|
||||
JobStatusDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, index );
|
||||
QFontMetrics fm( painter->font() );
|
||||
const bool allowMultiLine = index.data( JobStatusModel::AllowMultiLineRole ).toBool();
|
||||
@@ -106,7 +106,7 @@ JobStatusDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelInd
|
||||
return QSize( QStyledItemDelegate::sizeHint( option, index ).width(), m_cachedMultiLineHeights[ index ] );
|
||||
|
||||
// Don't elide, but stretch across as many rows as required
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, index );
|
||||
|
||||
const QString text = index.data( Qt::DisplayRole ).toString();
|
||||
|
@@ -31,12 +31,6 @@
|
||||
#include "Track.h"
|
||||
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#endif
|
||||
|
||||
|
||||
TransferStatusItem::TransferStatusItem( TransferStatusManager* p, StreamConnection* sc )
|
||||
: m_parent( p )
|
||||
, m_stream( QPointer< StreamConnection >( sc ) )
|
||||
|
@@ -23,10 +23,6 @@
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Msg.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
QTcpSocketExtra::connectToHost( const QHostAddress& host, quint16 port, OpenMode openMode )
|
||||
{
|
||||
|
@@ -576,11 +576,7 @@ Servent::handleSipInfo( const Tomahawk::peerinfo_ptr& peerInfo )
|
||||
|
||||
|
||||
void
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
Servent::incomingConnection( qintptr sd )
|
||||
#else
|
||||
Servent::incomingConnection( int sd )
|
||||
#endif
|
||||
{
|
||||
Q_ASSERT( this->thread() == QThread::currentThread() );
|
||||
|
||||
|
@@ -157,11 +157,7 @@ signals:
|
||||
void ready();
|
||||
|
||||
protected:
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
void incomingConnection( qintptr sd ) Q_DECL_OVERRIDE;
|
||||
#else
|
||||
void incomingConnection( int sd ) Q_DECL_OVERRIDE;
|
||||
#endif
|
||||
|
||||
public slots:
|
||||
void setExternalAddress( QHostAddress ha, unsigned int port );
|
||||
|
@@ -108,7 +108,7 @@ ColumnItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option
|
||||
QColor textColor = TomahawkUtils::alphaBlend( option.palette.color( QPalette::Foreground ), option.palette.color( QPalette::Background ), opacity );
|
||||
|
||||
{
|
||||
QStyleOptionViewItemV4 o = option;
|
||||
QStyleOptionViewItem o = option;
|
||||
initStyleOption( &o, QModelIndex() );
|
||||
|
||||
painter->save();
|
||||
@@ -190,7 +190,7 @@ ColumnItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option
|
||||
if ( text.trimmed().isEmpty() )
|
||||
text = tr( "Unknown" );
|
||||
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, QModelIndex() );
|
||||
|
||||
const QModelIndex curIndex = m_view->currentIndex();
|
||||
|
@@ -129,7 +129,7 @@ GridItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
if ( !item || !index.isValid() )
|
||||
return;
|
||||
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption( &opt, QModelIndex() );
|
||||
// qApp->style()->drawControl( QStyle::CE_ItemViewItem, &opt, painter );
|
||||
|
||||
|
@@ -106,7 +106,7 @@ PlaylistItemDelegate::sizeHint( const QStyleOptionViewItem& option, const QModel
|
||||
|
||||
|
||||
void
|
||||
PlaylistItemDelegate::prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item ) const
|
||||
PlaylistItemDelegate::prepareStyleOption( QStyleOptionViewItem* option, const QModelIndex& index, PlayableItem* item ) const
|
||||
{
|
||||
initStyleOption( option, index );
|
||||
|
||||
@@ -176,7 +176,7 @@ PlaylistItemDelegate::paintDetailed( QPainter* painter, const QStyleOptionViewIt
|
||||
QTextOption textOption( Qt::AlignVCenter | (Qt::Alignment)index.data( Qt::TextAlignmentRole ).toUInt() );
|
||||
textOption.setWrapMode( QTextOption::NoWrap );
|
||||
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
prepareStyleOption( &opt, index, item );
|
||||
opt.text.clear();
|
||||
qApp->style()->drawControl( QStyle::CE_ItemViewItem, &opt, painter );
|
||||
|
@@ -59,7 +59,7 @@ private slots:
|
||||
void doUpdateIndex( const QPersistentModelIndex& index );
|
||||
|
||||
protected:
|
||||
void prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item ) const;
|
||||
void prepareStyleOption( QStyleOptionViewItem* option, const QModelIndex& index, PlayableItem* item ) const;
|
||||
|
||||
void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
|
@@ -40,11 +40,6 @@
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "utils/PixmapDelegateFader.h"
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -98,7 +93,7 @@ TrackItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
PlayableItem* item = m_model->itemFromIndex( m_model->mapToSource( index ) );
|
||||
Q_ASSERT( item );
|
||||
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
prepareStyleOption( &opt, index, item );
|
||||
|
||||
if ( item->source() )
|
||||
|
@@ -36,12 +36,6 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "InboxModel.h"
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "collection/Collection.h"
|
||||
#include "utils/PixmapDelegateFader.h"
|
||||
#endif
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QPainter>
|
||||
#include <QScrollBar>
|
||||
|
@@ -35,13 +35,8 @@ ViewHeader::ViewHeader( QAbstractItemView* parent )
|
||||
{
|
||||
m_menu->setFont( TomahawkUtils::systemFont() );
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
setSectionResizeMode( QHeaderView::Interactive );
|
||||
setSectionsMovable( true );
|
||||
#else
|
||||
setResizeMode( QHeaderView::Interactive );
|
||||
setMovable( true );
|
||||
#endif
|
||||
setMinimumSectionSize( 60 );
|
||||
setDefaultAlignment( Qt::AlignLeft );
|
||||
setStretchLastSection( true );
|
||||
|
@@ -286,7 +286,7 @@ DynamicView::backgroundBetween( QRect rect, int rowStart )
|
||||
QPixmap bg = QPixmap( rect.size() );
|
||||
bg.fill( Qt::white );
|
||||
QPainter p( &bg );
|
||||
QStyleOptionViewItemV4 opt = viewOptions();
|
||||
QStyleOptionViewItem opt = viewOptions();
|
||||
// code taken from QTreeViewPrivate::paintAlternatingRowColors
|
||||
m_fadebg = !style()->styleHint( QStyle::SH_ItemView_PaintAlternatingRowColorsForEmptyArea, &opt );
|
||||
// qDebug() << "PAINTING ALTERNATING ROW BG!: " << fadingRectViewport;
|
||||
@@ -299,9 +299,9 @@ DynamicView::backgroundBetween( QRect rect, int rowStart )
|
||||
// qDebug() << "PAINTING BG ROW IN RECT" << y << "to" << y + rowHeight << ":" << opt.rect;
|
||||
if ( current & 1 )
|
||||
{
|
||||
opt.features |= QStyleOptionViewItemV2::Alternate;
|
||||
opt.features |= QStyleOptionViewItem::Alternate;
|
||||
} else {
|
||||
opt.features &= ~QStyleOptionViewItemV2::Alternate;
|
||||
opt.features &= ~QStyleOptionViewItem::Alternate;
|
||||
}
|
||||
++current;
|
||||
style()->drawPrimitive( QStyle::PE_PanelItemViewRow, &opt, &p );
|
||||
|
@@ -24,11 +24,7 @@
|
||||
#include <QTimer>
|
||||
#include <QPointer>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Playlist.h>
|
||||
#else
|
||||
#include <echonest/Playlist.h>
|
||||
#endif
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
@@ -28,14 +28,8 @@
|
||||
|
||||
#include "DllMacro.h"
|
||||
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Playlist.h>
|
||||
#include <echonest5/Genre.h>
|
||||
#else
|
||||
#include <echonest/Playlist.h>
|
||||
#include <echonest/Genre.h>
|
||||
#endif
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
@@ -24,11 +24,7 @@
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <echonest5/Playlist.h>
|
||||
#else
|
||||
#include <echonest/Playlist.h>
|
||||
#endif
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QHBoxLayout>
|
||||
|
@@ -95,11 +95,9 @@ Tomahawk::ExternalResolverGui::setupClickHandlerOnUrlButtons( QObject* widget )
|
||||
QPushButton* button = qobject_cast< QPushButton* >( widget );
|
||||
Q_ASSERT( button );
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
connect( button, &QPushButton::clicked, [=]() {
|
||||
QDesktopServices::openUrl( widget->property( "url" ).toUrl() );
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
// and recurse
|
||||
|
6
src/libtomahawk/thirdparty/Qocoa/qocoa_mac.h
vendored
6
src/libtomahawk/thirdparty/Qocoa/qocoa_mac.h
vendored
@@ -29,9 +29,7 @@ THE SOFTWARE.
|
||||
#include <QVBoxLayout>
|
||||
#include <QMacCocoaViewContainer>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <qmacfunctions.h>
|
||||
#endif
|
||||
|
||||
static inline NSString* fromQString(const QString &string)
|
||||
{
|
||||
@@ -49,11 +47,7 @@ static inline QString toQString(NSString *string)
|
||||
|
||||
static inline NSImage* fromQPixmap(const QPixmap &pixmap)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
CGImageRef cgImage = pixmap.toMacCGImageRef();
|
||||
#else
|
||||
CGImageRef cgImage = QtMac::toCGImageRef(pixmap);
|
||||
#endif
|
||||
|
||||
return [[[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize] autorelease];
|
||||
}
|
||||
|
@@ -192,11 +192,7 @@ void QSearchField::setMenu(QMenu *menu)
|
||||
if (!pimpl)
|
||||
return;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
NSMenu *nsMenu = menu->macMenu();
|
||||
#else
|
||||
NSMenu *nsMenu = menu->toNSMenu();
|
||||
#endif
|
||||
|
||||
[[pimpl->nsSearchField cell] setSearchMenuTemplate:nsMenu];
|
||||
}
|
||||
|
@@ -36,11 +36,6 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QRegExp>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Playlist.h"
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -18,16 +18,9 @@
|
||||
|
||||
#include "Json.h"
|
||||
|
||||
// Qt version specific includes
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include <QJsonDocument>
|
||||
#include <QMetaProperty>
|
||||
#include <QVariantHash>
|
||||
#else
|
||||
#include <qjson/parser.h>
|
||||
#include <qjson/qobjecthelper.h>
|
||||
#include <qjson/serializer.h>
|
||||
#endif
|
||||
#include <QJsonDocument>
|
||||
#include <QMetaProperty>
|
||||
#include <QVariantHash>
|
||||
|
||||
namespace TomahawkUtils
|
||||
{
|
||||
@@ -35,7 +28,6 @@ namespace TomahawkUtils
|
||||
QVariantMap
|
||||
qobject2qvariant( const QObject* object )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QVariantMap map;
|
||||
if ( object == NULL )
|
||||
{
|
||||
@@ -52,16 +44,12 @@ qobject2qvariant( const QObject* object )
|
||||
}
|
||||
}
|
||||
return map;
|
||||
#else
|
||||
return QJson::QObjectHelper::qobject2qvariant( object );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
qvariant2qobject( const QVariantMap& variant, QObject* object )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
for ( QVariantMap::const_iterator iter = variant.begin(); iter != variant.end(); ++iter )
|
||||
{
|
||||
QVariant property = object->property( iter.key().toLatin1() );
|
||||
@@ -78,16 +66,12 @@ qvariant2qobject( const QVariantMap& variant, QObject* object )
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
QJson::QObjectHelper::qvariant2qobject( variant, object );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
parseJson( const QByteArray& jsonData, bool* ok )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QJsonParseError error;
|
||||
QJsonDocument doc = QJsonDocument::fromJson( jsonData, &error );
|
||||
if ( ok != NULL )
|
||||
@@ -95,17 +79,12 @@ parseJson( const QByteArray& jsonData, bool* ok )
|
||||
*ok = ( error.error == QJsonParseError::NoError );
|
||||
}
|
||||
return doc.toVariant();
|
||||
#else
|
||||
QJson::Parser p;
|
||||
return p.parse( jsonData, ok );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
QByteArray
|
||||
toJson( const QVariant &variant, bool* ok )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QVariant _variant = variant;
|
||||
if ( variant.type() == QVariant::Hash )
|
||||
{
|
||||
@@ -127,10 +106,6 @@ toJson( const QVariant &variant, bool* ok )
|
||||
*ok = !doc.isNull();
|
||||
}
|
||||
return doc.toJson( QJsonDocument::Compact );
|
||||
#else
|
||||
QJson::Serializer serializer;
|
||||
return serializer.serialize( variant, ok );
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -128,20 +128,12 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
|
||||
|
||||
|
||||
void
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
TomahawkLogHandler( QtMsgType type, const QMessageLogContext& context, const QString& msg )
|
||||
#else
|
||||
TomahawkLogHandler( QtMsgType type, const char* msg )
|
||||
#endif
|
||||
{
|
||||
static QMutex s_mutex;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QByteArray ba = msg.toUtf8();
|
||||
const char* message = ba.constData();
|
||||
#else
|
||||
const char* message = msg;
|
||||
#endif
|
||||
|
||||
QMutexLocker locker( &s_mutex );
|
||||
switch( type )
|
||||
@@ -150,6 +142,10 @@ TomahawkLogHandler( QtMsgType type, const char* msg )
|
||||
log( message, LOGTHIRDPARTY );
|
||||
break;
|
||||
|
||||
case QtInfoMsg:
|
||||
log( message, 0 );
|
||||
break;
|
||||
|
||||
case QtCriticalMsg:
|
||||
log( message, 0 );
|
||||
break;
|
||||
@@ -196,11 +192,7 @@ setupLogfile( QFile& f )
|
||||
logStream.open( f.fileName().toStdString().c_str() );
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
qInstallMessageHandler( TomahawkLogHandler );
|
||||
#else
|
||||
qInstallMsgHandler( TomahawkLogHandler );
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -69,8 +69,4 @@ private:
|
||||
QUrl m_url;
|
||||
};
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
Q_DECLARE_METATYPE( NetworkReply* )
|
||||
#endif
|
||||
|
||||
#endif // NETWORKREPLY_H
|
||||
|
@@ -40,7 +40,6 @@ SharedTimeLine::SharedTimeLine()
|
||||
void
|
||||
SharedTimeLine::connectNotify( const QMetaMethod& signal )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
if ( signal == QMetaMethod::fromSignal( &SharedTimeLine::frameChanged ) )
|
||||
{
|
||||
m_refcount++;
|
||||
@@ -49,10 +48,6 @@ SharedTimeLine::connectNotify( const QMetaMethod& signal )
|
||||
m_timeline.start();
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED( signal );
|
||||
Q_ASSERT( false );
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -72,7 +67,6 @@ SharedTimeLine::connectNotify( const char* signal )
|
||||
void
|
||||
SharedTimeLine::disconnectNotify( const QMetaMethod& signal )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
if ( signal == QMetaMethod::fromSignal( &SharedTimeLine::frameChanged ) )
|
||||
{
|
||||
m_refcount--;
|
||||
@@ -82,10 +76,6 @@ SharedTimeLine::disconnectNotify( const QMetaMethod& signal )
|
||||
deleteLater();
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED( signal );
|
||||
Q_ASSERT( false );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@@ -32,20 +32,11 @@
|
||||
#include "Track.h"
|
||||
|
||||
#ifdef LIBLASTFM_FOUND
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <lastfm5/ws.h>
|
||||
#else
|
||||
#include <lastfm/ws.h>
|
||||
#endif
|
||||
#include <lastfm5/ws.h>
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
#include <quazip5/quazip.h>
|
||||
#include <quazip5/quazipfile.h>
|
||||
#else
|
||||
#include <quazip/quazip.h>
|
||||
#include <quazip/quazipfile.h>
|
||||
#endif
|
||||
// We need this for the version info (if available)
|
||||
#include <taglib/taglib.h>
|
||||
|
||||
@@ -62,10 +53,7 @@
|
||||
#include <QStringList>
|
||||
#include <QTranslator>
|
||||
|
||||
// Qt version specific includes
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include <QUrlQuery>
|
||||
#endif
|
||||
#include <QUrlQuery>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
@@ -545,35 +533,7 @@ mergePlaylistChanges( const QList< Tomahawk::query_ptr >& orig, const QList< Tom
|
||||
bool
|
||||
removeDirectory( const QString& dir )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return QDir( dir ).removeRecursively();
|
||||
#else
|
||||
const QDir aDir( dir );
|
||||
|
||||
tLog() << "Deleting DIR:" << dir;
|
||||
bool has_err = false;
|
||||
if ( aDir.exists() )
|
||||
{
|
||||
foreach ( const QFileInfo& entry, aDir.entryInfoList( QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files | QDir::NoSymLinks ) )
|
||||
{
|
||||
QString path = entry.absoluteFilePath();
|
||||
if ( entry.isDir() )
|
||||
{
|
||||
has_err = !removeDirectory( path ) || has_err;
|
||||
}
|
||||
else if ( !QFile::remove( path ) )
|
||||
{
|
||||
has_err = true;
|
||||
}
|
||||
}
|
||||
if ( !aDir.rmdir( aDir.absolutePath() ) )
|
||||
{
|
||||
has_err = true;
|
||||
}
|
||||
}
|
||||
|
||||
return !has_err;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -676,40 +636,32 @@ public:
|
||||
{
|
||||
};
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QString translate( const char * context, const char * sourceText, const char * disambiguation = 0 ) const Q_DECL_OVERRIDE
|
||||
QString translate( const char * context, const char * sourceText, const char * disambiguation = 0, int n = -1) const Q_DECL_OVERRIDE
|
||||
{
|
||||
QString translation = QTranslator::translate( context, sourceText, disambiguation );
|
||||
#else
|
||||
QString translate( const char * context, const char * sourceText, const char * disambiguation = 0, int n = -1) const Q_DECL_OVERRIDE
|
||||
QString translation = QTranslator::translate( context, sourceText, disambiguation, n );
|
||||
|
||||
if( translation.isEmpty() )
|
||||
{
|
||||
QString translation = QTranslator::translate( context, sourceText, disambiguation, n );
|
||||
#endif
|
||||
if( translation.isEmpty() )
|
||||
{
|
||||
translation = QString::fromUtf8( sourceText );
|
||||
}
|
||||
|
||||
// // lowercase all strings not on whats new page ...
|
||||
// // TODO: rather scan disambiguation for nolowercase, but too lazy for that right now
|
||||
// if( strcmp( context, "WhatsNewWidget_0_8" ) )
|
||||
// {
|
||||
// translation = translation.toLower();
|
||||
// }
|
||||
|
||||
return translation.replace( "%applicationName", TOMAHAWK_APPLICATION_NAME, Qt::CaseInsensitive );
|
||||
translation = QString::fromUtf8( sourceText );
|
||||
}
|
||||
|
||||
// // lowercase all strings not on whats new page ...
|
||||
// // TODO: rather scan disambiguation for nolowercase, but too lazy for that right now
|
||||
// if( strcmp( context, "WhatsNewWidget_0_8" ) )
|
||||
// {
|
||||
// translation = translation.toLower();
|
||||
// }
|
||||
|
||||
return translation.replace( "%applicationName", TOMAHAWK_APPLICATION_NAME, Qt::CaseInsensitive );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
installTranslator( QObject* parent )
|
||||
{
|
||||
#if QT_VERSION >= 0x040800
|
||||
QString locale = QLocale::system().uiLanguages().first().replace( "-", "_" );
|
||||
#else
|
||||
QString locale = QLocale::system().name();
|
||||
#endif
|
||||
|
||||
if ( locale == "C" )
|
||||
locale = "en";
|
||||
|
||||
@@ -970,57 +922,37 @@ compareVersionStrings( const QString& first, const QString& second )
|
||||
void
|
||||
urlAddQueryItem( QUrl& url, const QString& key, const QString& value )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QUrlQuery urlQuery( url );
|
||||
urlQuery.addQueryItem( key, value );
|
||||
url.setQuery( urlQuery );
|
||||
#else
|
||||
url.addQueryItem( key, value );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
urlQueryItemValue( const QUrl& url, const QString& key )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return QUrlQuery( url ).queryItemValue( key ).replace( "+", " " );
|
||||
#else
|
||||
return url.queryItemValue( key ).replace( "+", " " );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
urlHasQueryItem( const QUrl& url, const QString& key )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return QUrlQuery( url ).hasQueryItem( key );
|
||||
#else
|
||||
return url.hasQueryItem( key );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
QList<QPair<QString, QString> >
|
||||
urlQueryItems( const QUrl& url )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return QUrlQuery( url ).queryItems();
|
||||
#else
|
||||
return url.queryItems();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
urlSetQuery( QUrl& url, const QString& query )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
url.setQuery( query );
|
||||
#else
|
||||
url.setEncodedQuery( query.toLocal8Bit() );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1046,11 +978,7 @@ QByteArray
|
||||
encodedQuery( const QUrl& url )
|
||||
{
|
||||
QByteArray data;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
data = url.query(QUrl::FullyEncoded).toUtf8();
|
||||
#else
|
||||
data = url.encodedQuery();
|
||||
#endif
|
||||
// QUrl doesn't encode : or ; which it should, as well as some other things, so be safer here in general.
|
||||
data.replace( "'", "%27" );
|
||||
data.replace( ".", "%2E" );
|
||||
|
@@ -40,16 +40,9 @@
|
||||
#include <QStyleOption>
|
||||
#include <QDesktopServices>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include <QWindow>
|
||||
#ifdef HAVE_X11
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
#else
|
||||
#ifdef Q_WS_X11
|
||||
#include <QX11Info>
|
||||
#include <libqnetwm/netwm.h>
|
||||
#endif
|
||||
#include <QWindow>
|
||||
#ifdef HAVE_X11
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -324,34 +317,6 @@ bringToFront()
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
{
|
||||
QWidget* widget = tomahawkWindow();
|
||||
if ( !widget )
|
||||
return;
|
||||
|
||||
widget->show();
|
||||
widget->activateWindow();
|
||||
widget->raise();
|
||||
|
||||
WId wid = widget->winId();
|
||||
NETWM::init();
|
||||
|
||||
XEvent e;
|
||||
e.xclient.type = ClientMessage;
|
||||
e.xclient.message_type = NETWM::NET_ACTIVE_WINDOW;
|
||||
e.xclient.display = QX11Info::display();
|
||||
e.xclient.window = wid;
|
||||
e.xclient.format = 32;
|
||||
e.xclient.data.l[0] = 2;
|
||||
e.xclient.data.l[1] = QX11Info::appTime();
|
||||
e.xclient.data.l[2] = 0;
|
||||
e.xclient.data.l[3] = 0l;
|
||||
e.xclient.data.l[4] = 0l;
|
||||
|
||||
XSendEvent( QX11Info::display(), RootWindow( QX11Info::display(), DefaultScreen( QX11Info::display() ) ), False, SubstructureRedirectMask | SubstructureNotifyMask, &e );
|
||||
}
|
||||
#else // Qt5
|
||||
{
|
||||
QWidget* widget = tomahawkWindow();
|
||||
if ( !widget )
|
||||
@@ -371,7 +336,6 @@ bringToFront()
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -817,7 +781,7 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
|
||||
|
||||
void
|
||||
prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item )
|
||||
prepareStyleOption( QStyleOptionViewItem* option, const QModelIndex& index, PlayableItem* item )
|
||||
{
|
||||
Q_UNUSED( index );
|
||||
|
||||
|
@@ -69,7 +69,7 @@ namespace TomahawkUtils
|
||||
DLLEXPORT void setSystemFont( QFont font );
|
||||
DLLEXPORT QFont systemFont();
|
||||
|
||||
DLLEXPORT void prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item );
|
||||
DLLEXPORT void prepareStyleOption( QStyleOptionViewItem* option, const QModelIndex& index, PlayableItem* item );
|
||||
|
||||
DLLEXPORT void drawRoundedButton( QPainter* painter, const QRect& btnRect, const QColor& color, const QColor &gradient1bottom = QColor(), const QColor& gradient2top = QColor(), const QColor& gradient2bottom = QColor() );
|
||||
|
||||
|
@@ -26,11 +26,6 @@
|
||||
#include <QPainter>
|
||||
#include <QPropertyAnimation>
|
||||
|
||||
// Forward Declarations breaking QSharedPointer
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include "Source.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define CORNER_ROUNDNESS 8.0
|
||||
#define FADING_DURATION 500
|
||||
|
@@ -171,7 +171,7 @@ void LineEdit::updateTextMargins()
|
||||
|
||||
void LineEdit::updateSideWidgetLocations()
|
||||
{
|
||||
QStyleOptionFrameV2 opt;
|
||||
QStyleOptionFrame opt;
|
||||
initStyleOption(&opt);
|
||||
QRect textRect = style()->subElementRect(QStyle::SE_LineEditContents, &opt, this);
|
||||
int spacing = m_rightLayout->spacing();
|
||||
@@ -214,7 +214,7 @@ void LineEdit::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QLineEdit::paintEvent(event);
|
||||
if (text().isEmpty() && !m_inactiveText.isEmpty() && !hasFocus()) {
|
||||
QStyleOptionFrameV2 panel;
|
||||
QStyleOptionFrame panel;
|
||||
initStyleOption(&panel);
|
||||
QRect textRect = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
|
||||
int horizontalMargin = 2;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user