Hello community, here is the log from the commit of package qsynth for openSUSE:Factory checked in at 2019-03-12 09:54:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qsynth (Old) and /work/SRC/openSUSE:Factory/.qsynth.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qsynth" Tue Mar 12 09:54:10 2019 rev:5 rq:683755 version:0.5.5 Changes: -------- --- /work/SRC/openSUSE:Factory/qsynth/qsynth.changes 2018-12-06 12:18:40.745432077 +0100 +++ /work/SRC/openSUSE:Factory/.qsynth.new.28833/qsynth.changes 2019-03-12 09:54:11.939528681 +0100 @@ -1,0 +2,9 @@ +Mon Mar 11 10:29:47 UTC 2019 - Luigi Baldoni <aloi...@gmx.com> + +- Update to version 0.5.5 (Pre-LAC2019 Release Frenzy) + * Refactored all singleton/unique application instance + setup logic away from X11/Xcb hackery. + * HiDPI display screen support (Qt >= 5.6). + * Bumped copyright headers into the New Year (2019). + +------------------------------------------------------------------- Old: ---- qsynth-0.5.4.tar.gz New: ---- qsynth-0.5.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qsynth.spec ++++++ --- /var/tmp/diff_new_pack.8hmYjt/_old 2019-03-12 09:54:12.579528553 +0100 +++ /var/tmp/diff_new_pack.8hmYjt/_new 2019-03-12 09:54:12.579528553 +0100 @@ -1,7 +1,7 @@ # # spec file for package qsynth # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2014 Pascal Bleser <pascal.ble...@opensuse.org> # # All modifications and additions to the file contributed by third parties @@ -13,12 +13,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: qsynth -Version: 0.5.4 +Version: 0.5.5 Release: 0 Summary: Graphical User Interface for fluidsynth License: GPL-2.0-or-later ++++++ qsynth-0.5.4.tar.gz -> qsynth-0.5.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/CMakeLists.txt new/qsynth-0.5.5/CMakeLists.txt --- old/qsynth-0.5.4/CMakeLists.txt 2018-12-05 17:10:36.344638996 +0100 +++ new/qsynth-0.5.5/CMakeLists.txt 2019-03-11 10:53:11.714169336 +0100 @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) -set (VERSION "0.5.4") +set (VERSION "0.5.5") set (PACKAGE_NAME "Qsynth") set (PACKAGE_VERSION "${VERSION}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/ChangeLog new/qsynth-0.5.5/ChangeLog --- old/qsynth-0.5.4/ChangeLog 2018-12-05 17:10:36.344638996 +0100 +++ new/qsynth-0.5.5/ChangeLog 2019-03-11 10:53:11.714169336 +0100 @@ -4,6 +4,16 @@ ChangeLog +0.5.5 2019-03-11 Pre-LAC2019 Release Frenzy. + +- Refactored all singleton/unique application instance + setup logic away from X11/Xcb hackery. + +- HiDPI display screen support (Qt >= 5.6). + +- Bumped copyright headers into the New Year (2019). + + 0.5.4 2018-12-05 End of Autumn'18 Release. - Reset button now also resets master Gain, Reverb and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/Makefile.in new/qsynth-0.5.5/Makefile.in --- old/qsynth-0.5.4/Makefile.in 2018-12-05 17:10:36.344638996 +0100 +++ new/qsynth-0.5.5/Makefile.in 2019-03-11 10:53:11.714169336 +0100 @@ -6,6 +6,7 @@ headers = \ src/config.h \ + src/qsynth.h \ src/qsynthAbout.h \ src/qsynthEngine.h \ src/qsynthChannels.h \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/configure new/qsynth-0.5.5/configure --- old/qsynth-0.5.4/configure 2018-12-05 17:11:05.967637231 +0100 +++ new/qsynth-0.5.5/configure 2019-03-11 10:53:37.201167817 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Qsynth 0.5.4. +# Generated by GNU Autoconf 2.69 for Qsynth 0.5.5. # # Report bugs to <rn...@rncbc.org>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='Qsynth' PACKAGE_TARNAME='qsynth' -PACKAGE_VERSION='0.5.4' -PACKAGE_STRING='Qsynth 0.5.4' +PACKAGE_VERSION='0.5.5' +PACKAGE_STRING='Qsynth 0.5.5' PACKAGE_BUGREPORT='rn...@rncbc.org' PACKAGE_URL='' @@ -629,9 +629,9 @@ ac_ldflags ac_incpath ac_cflags -ac_qx11extras -QT5X11EXTRAS_LIBS -QT5X11EXTRAS_CFLAGS +ac_qnetwork +QT5NETWORK_LIBS +QT5NETWORK_CFLAGS EGREP GREP FLUIDSYNTH_LIBS @@ -734,8 +734,8 @@ PKG_CONFIG_LIBDIR FLUIDSYNTH_CFLAGS FLUIDSYNTH_LIBS -QT5X11EXTRAS_CFLAGS -QT5X11EXTRAS_LIBS' +QT5NETWORK_CFLAGS +QT5NETWORK_LIBS' # Initialize some variables set by options. @@ -1276,7 +1276,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Qsynth 0.5.4 to adapt to many kinds of systems. +\`configure' configures Qsynth 0.5.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1337,7 +1337,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Qsynth 0.5.4:";; + short | recursive ) echo "Configuration of Qsynth 0.5.5:";; esac cat <<\_ACEOF @@ -1354,7 +1354,7 @@ enable FluidSynth MIDI router support (DEPRECATED) (default=no) --enable-fluid-server enable FluidSynth server (default=yes) - --enable-xunique enable X11 unique/single instance (default=yes) + --enable-xunique enable unique/single instance (default=yes) --enable-gradient enable gradient eye-candy (default=yes) --enable-stacktrace enable debugger stack-trace (default=no) @@ -1385,10 +1385,10 @@ C compiler flags for FLUIDSYNTH, overriding pkg-config FLUIDSYNTH_LIBS linker flags for FLUIDSYNTH, overriding pkg-config - QT5X11EXTRAS_CFLAGS - C compiler flags for QT5X11EXTRAS, overriding pkg-config - QT5X11EXTRAS_LIBS - linker flags for QT5X11EXTRAS, overriding pkg-config + QT5NETWORK_CFLAGS + C compiler flags for QT5NETWORK, overriding pkg-config + QT5NETWORK_LIBS + linker flags for QT5NETWORK, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1456,7 +1456,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Qsynth configure 0.5.4 +Qsynth configure 0.5.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1900,7 +1900,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Qsynth $as_me 0.5.4, which was +It was created by Qsynth $as_me 0.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2406,7 +2406,7 @@ fi -# Enable X11 unique/single instance. +# Enable unique/single instance. # Check whether --enable-xunique was given. if test "${enable_xunique+set}" = set; then : enableval=$enable_xunique; ac_xunique="$enableval" @@ -5470,23 +5470,23 @@ done -# Check for X11 unique/single instance. +# Check for unique/single instance support. if test "x$ac_xunique" = "xyes"; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5X11Extras" >&5 -$as_echo_n "checking for Qt5X11Extras... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5Network" >&5 +$as_echo_n "checking for Qt5Network... " >&6; } -if test -n "$QT5X11EXTRAS_CFLAGS"; then - pkg_cv_QT5X11EXTRAS_CFLAGS="$QT5X11EXTRAS_CFLAGS" +if test -n "$QT5NETWORK_CFLAGS"; then + pkg_cv_QT5NETWORK_CFLAGS="$QT5NETWORK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5X11Extras\""; } >&5 - ($PKG_CONFIG --exists --print-errors "Qt5X11Extras") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Network\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Network") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_QT5X11EXTRAS_CFLAGS=`$PKG_CONFIG --cflags "Qt5X11Extras" 2>/dev/null` + pkg_cv_QT5NETWORK_CFLAGS=`$PKG_CONFIG --cflags "Qt5Network" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -5494,16 +5494,16 @@ else pkg_failed=untried fi -if test -n "$QT5X11EXTRAS_LIBS"; then - pkg_cv_QT5X11EXTRAS_LIBS="$QT5X11EXTRAS_LIBS" +if test -n "$QT5NETWORK_LIBS"; then + pkg_cv_QT5NETWORK_LIBS="$QT5NETWORK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5X11Extras\""; } >&5 - ($PKG_CONFIG --exists --print-errors "Qt5X11Extras") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Network\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Network") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_QT5X11EXTRAS_LIBS=`$PKG_CONFIG --libs "Qt5X11Extras" 2>/dev/null` + pkg_cv_QT5NETWORK_LIBS=`$PKG_CONFIG --libs "Qt5Network" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -5524,34 +5524,30 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - QT5X11EXTRAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5X11Extras" 2>&1` + QT5NETWORK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Network" 2>&1` else - QT5X11EXTRAS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5X11Extras" 2>&1` + QT5NETWORK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Network" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$QT5X11EXTRAS_PKG_ERRORS" >&5 + echo "$QT5NETWORK_PKG_ERRORS" >&5 - ac_xunique="no" + ac_qt5network="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - ac_xunique="no" + ac_qt5network="no" else - QT5X11EXTRAS_CFLAGS=$pkg_cv_QT5X11EXTRAS_CFLAGS - QT5X11EXTRAS_LIBS=$pkg_cv_QT5X11EXTRAS_LIBS + QT5NETWORK_CFLAGS=$pkg_cv_QT5NETWORK_CFLAGS + QT5NETWORK_LIBS=$pkg_cv_QT5NETWORK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - ac_xunique="yes" + ac_qt5network="yes" fi -fi -if test "x$ac_xunique" = "xyes"; then + if test "x$ac_qt5network" = "xyes"; then $as_echo "#define CONFIG_XUNIQUE 1" >>confdefs.h - ac_qx11extras="x11extras" - # Some recent distros (eg. fedora, debian) require this. - if test "x$ac_cv_lib_X11_main" = "xyes"; then - ac_libs="$ac_libs -lX11" + ac_qnetwork="network" fi fi @@ -7325,7 +7321,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Qsynth $as_me 0.5.4, which was +This file was extended by Qsynth $as_me 0.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7387,7 +7383,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Qsynth config.status 0.5.4 +Qsynth config.status 0.5.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -8114,7 +8110,7 @@ echo echo " System tray icon support . . . . . . . . . . . . .: $ac_system_tray" echo -echo " X11 Unique/Single instance . . . . . . . . . . . .: $ac_xunique" +echo " Unique/Single instance support . . . . . . . . . .: $ac_xunique" echo " Gradient eye-candy . . . . . . . . . . . . . . . .: $ac_gradient" echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" echo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/configure.ac new/qsynth-0.5.5/configure.ac --- old/qsynth-0.5.4/configure.ac 2018-12-05 17:10:36.344638996 +0100 +++ new/qsynth-0.5.5/configure.ac 2019-03-11 10:53:11.714169336 +0100 @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(Qsynth, 0.5.4, rn...@rncbc.org, qsynth) +AC_INIT(Qsynth, 0.5.5, rn...@rncbc.org, qsynth) AC_CONFIG_SRCDIR(src/qsynth.cpp) AC_CONFIG_HEADERS(src/config.h) @@ -102,9 +102,9 @@ [ac_fluid_server="$enableval"], [ac_fluid_server="yes"]) -# Enable X11 unique/single instance. +# Enable unique/single instance. AC_ARG_ENABLE(xunique, - AS_HELP_STRING([--enable-xunique], [enable X11 unique/single instance (default=yes)]), + AS_HELP_STRING([--enable-xunique], [enable unique/single instance (default=yes)]), [ac_xunique="$enableval"], [ac_xunique="yes"]) @@ -333,19 +333,15 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h) -# Check for X11 unique/single instance. +# Check for unique/single instance support. if test "x$ac_xunique" = "xyes"; then - PKG_CHECK_MODULES([QT5X11EXTRAS], [Qt5X11Extras], [ac_xunique="yes"], [ac_xunique="no"]) -fi -if test "x$ac_xunique" = "xyes"; then - AC_DEFINE(CONFIG_XUNIQUE, 1, [Define if X11 unique/single instance is enabled.]) - ac_qx11extras="x11extras" - # Some recent distros (eg. fedora, debian) require this. - if test "x$ac_cv_lib_X11_main" = "xyes"; then - ac_libs="$ac_libs -lX11" + PKG_CHECK_MODULES([QT5NETWORK], [Qt5Network], [ac_qt5network="yes"], [ac_qt5network="no"]) + if test "x$ac_qt5network" = "xyes"; then + AC_DEFINE(CONFIG_XUNIQUE, 1, [Define if unique/single instance is enabled.]) + ac_qnetwork="network" fi fi -AC_SUBST(ac_qx11extras) +AC_SUBST(ac_qnetwork) # Check for gradient eye-candy. if test "x$ac_gradient" = "xyes"; then @@ -561,7 +557,7 @@ echo echo " System tray icon support . . . . . . . . . . . . .: $ac_system_tray" echo -echo " X11 Unique/Single instance . . . . . . . . . . . .: $ac_xunique" +echo " Unique/Single instance support . . . . . . . . . .: $ac_xunique" echo " Gradient eye-candy . . . . . . . . . . . . . . . .: $ac_gradient" echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" echo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/qsynth.spec.in new/qsynth-0.5.5/qsynth.spec.in --- old/qsynth-0.5.4/qsynth.spec.in 2018-12-05 17:10:36.345638996 +0100 +++ new/qsynth-0.5.5/qsynth.spec.in 2019-03-11 10:53:11.715169336 +0100 @@ -1,6 +1,6 @@ %define name @PACKAGE_TARNAME@ %define version @PACKAGE_VERSION@ -%define release 15 +%define release 16 %define _prefix @ac_prefix@ @@ -75,6 +75,8 @@ %{_datadir}/man/man1/%{name}*.1.gz %changelog +* Mon Mar 11 2019 Rui Nuno Capela <rn...@rncbc.org> 0.5.5 +- Pre-LAC2019 release frenzy. * Wed Dec 05 2018 Rui Nuno Capela <rn...@rncbc.org> 0.5.4 - End of Autumn'18 Release. * Wed Oct 10 2018 Rui Nuno Capela <rn...@rncbc.org> 0.5.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/CMakeLists.txt new/qsynth-0.5.5/src/CMakeLists.txt --- old/qsynth-0.5.4/src/CMakeLists.txt 2018-12-05 17:10:36.345638996 +0100 +++ new/qsynth-0.5.5/src/CMakeLists.txt 2019-03-11 10:53:11.715169336 +0100 @@ -15,6 +15,8 @@ set ( ac_prefix ${CMAKE_INSTALL_PREFIX} ) +configure_file ( qsynth.desktop ${CMAKE_CURRENT_BINARY_DIR}/qsynth.desktop ) + set ( HEADERS qsynthKnob.h qsynthMeter.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/appdata/qsynth.appdata.xml new/qsynth-0.5.5/src/appdata/qsynth.appdata.xml --- old/qsynth-0.5.4/src/appdata/qsynth.appdata.xml 2018-12-05 17:10:36.345638996 +0100 +++ new/qsynth-0.5.5/src/appdata/qsynth.appdata.xml 2019-03-11 10:53:11.715169336 +0100 @@ -14,11 +14,11 @@ </description> <launchable type="desktop-id">qsynth.desktop</launchable> <provides> - <binary>qsynth</binary> - </provides> + <binary>qsynth</binary> + </provides> <screenshots> <screenshot type="default"> - <image>http://qsynth.sourceforge.net/qsynthMainForm1.png</image> + <image>http://qsynth.sourceforge.io/image/qsynthMainForm1.png</image> <caption>The main window showing the application in action</caption> </screenshot> </screenshots> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/cmakeconfig.cmake new/qsynth-0.5.5/src/cmakeconfig.cmake --- old/qsynth-0.5.4/src/cmakeconfig.cmake 2018-12-05 17:10:36.345638996 +0100 +++ new/qsynth-0.5.5/src/cmakeconfig.cmake 2019-03-11 10:53:11.715169336 +0100 @@ -110,6 +110,9 @@ #cmakedefine CONFIG_FLUID_SETTINGS_FOREACH_OPTION @CONFIG_FLUID_SETTINGS_FOREACH_OPTION@ /* Define if new_fluid_server function is available. */ -#cmakedefine CONFIG_NEW_FLUID_SERVER CONFIG_NEW_FLUID_SERVER@ +#cmakedefine CONFIG_NEW_FLUID_SERVER @CONFIG_NEW_FLUID_SERVER@ + +/* Define if system tray is enabled. */ +#cmakedefine CONFIG_SYSTEM_TRAY @CONFIG_SYSTEM_TRAY@ #endif /* CONFIG_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/config.h.in new/qsynth-0.5.5/src/config.h.in --- old/qsynth-0.5.4/src/config.h.in 2018-12-05 17:11:05.000000000 +0100 +++ new/qsynth-0.5.5/src/config.h.in 2019-03-11 10:53:37.080167770 +0100 @@ -111,7 +111,7 @@ /* Version string. */ #undef CONFIG_VERSION -/* Define if X11 unique/single instance is enabled. */ +/* Define if unique/single instance is enabled. */ #undef CONFIG_XUNIQUE /* Define to 1 if you have the <fcntl.h> header file. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/qsynth.cpp new/qsynth-0.5.5/src/qsynth.cpp --- old/qsynth-0.5.4/src/qsynth.cpp 2018-12-05 17:10:36.346638996 +0100 +++ new/qsynth-0.5.5/src/qsynth.cpp 2019-03-11 10:53:11.715169336 +0100 @@ -1,7 +1,7 @@ // qsynth.cpp // /**************************************************************************** - Copyright (C) 2003-2018, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -19,11 +19,11 @@ *****************************************************************************/ -#include "qsynthAbout.h" +#include "qsynth.h" + #include "qsynthOptions.h" #include "qsynthMainForm.h" -#include <QApplication> #include <QLibraryInfo> #include <QTranslator> #include <QLocale> @@ -49,78 +49,65 @@ // Singleton application instance stuff (Qt/X11 only atm.) // -#if QT_VERSION < 0x050000 -#if defined(Q_WS_X11) -#define CONFIG_X11 -#endif -#else -#if defined(QT_X11EXTRAS_LIB) -#define CONFIG_X11 -#endif -#endif +#ifdef CONFIG_XUNIQUE +#define QSYNTH_XUNIQUE "qsynthApplication" +#if QT_VERSION < 0x050000 #ifdef CONFIG_X11 -#ifdef CONFIG_XUNIQUE -#include <QX11Info> +#include <unistd.h> /* for gethostname() */ #include <X11/Xatom.h> #include <X11/Xlib.h> -#define QSYNTH_XUNIQUE "qsynthApplication" - -#if QT_VERSION >= 0x050100 - -#include <xcb/xcb.h> -#include <xcb/xproto.h> - -#include <QAbstractNativeEventFilter> - -class qsynthApplication; - -class qsynthXcbEventFilter : public QAbstractNativeEventFilter -{ -public: - - // Constructor. - qsynthXcbEventFilter(qsynthApplication *pApp) - : QAbstractNativeEventFilter(), m_pApp(pApp) {} - - // XCB event filter (virtual processor). - bool nativeEventFilter(const QByteArray& eventType, void *message, long *); - -private: - - // Instance variable. - qsynthApplication *m_pApp; -}; - +#endif // CONFIG_X11 +#else +#include <QSharedMemory> +#include <QLocalServer> +#include <QLocalSocket> +#include <QHostInfo> #endif #endif // CONFIG_XUNIQUE -#endif // CONFIG_X11 -class qsynthApplication : public QApplication -{ -public: - // Constructor. - qsynthApplication(int& argc, char **argv) : QApplication(argc, argv), - m_pQtTranslator(0), m_pMyTranslator(0), m_pWidget(0) - { - // Load translation support. - QLocale loc; - if (loc.language() != QLocale::C) { - // Try own Qt translation... - m_pQtTranslator = new QTranslator(this); - QString sLocName = "qt_" + loc.name(); - QString sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); - if (m_pQtTranslator->load(sLocName, sLocPath)) { - QApplication::installTranslator(m_pQtTranslator); +// Constructor. +qsynthApplication::qsynthApplication ( int& argc, char **argv ) + : QApplication(argc, argv), + m_pQtTranslator(NULL), m_pMyTranslator(NULL), m_pWidget(NULL) +{ + // Load translation support. + QLocale loc; + if (loc.language() != QLocale::C) { + // Try own Qt translation... + m_pQtTranslator = new QTranslator(this); + QString sLocName = "qt_" + loc.name(); + QString sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); + if (m_pQtTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pQtTranslator); + } else { + delete m_pQtTranslator; + m_pQtTranslator = 0; + #ifdef CONFIG_DEBUG + qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", + loc.name().toLocal8Bit().data(), + sLocPath.toLocal8Bit().data(), + sLocName.toLocal8Bit().data()); + #endif + } + // Try own application translation... + m_pMyTranslator = new QTranslator(this); + sLocName = "qsynth_" + loc.name(); + if (m_pMyTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pMyTranslator); + } else { + sLocPath = CONFIG_DATADIR "/qsynth/translations"; + if (m_pMyTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pMyTranslator); } else { - delete m_pQtTranslator; - m_pQtTranslator = 0; + delete m_pMyTranslator; + m_pMyTranslator = 0; #ifdef CONFIG_DEBUG qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", loc.name().toLocal8Bit().data(), @@ -128,90 +115,83 @@ sLocName.toLocal8Bit().data()); #endif } - // Try own application translation... - m_pMyTranslator = new QTranslator(this); - sLocName = "qsynth_" + loc.name(); - if (m_pMyTranslator->load(sLocName, sLocPath)) { - QApplication::installTranslator(m_pMyTranslator); - } else { - sLocPath = CONFIG_DATADIR "/qsynth/translations"; - if (m_pMyTranslator->load(sLocName, sLocPath)) { - QApplication::installTranslator(m_pMyTranslator); - } else { - delete m_pMyTranslator; - m_pMyTranslator = 0; - #ifdef CONFIG_DEBUG - qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", - loc.name().toLocal8Bit().data(), - sLocPath.toLocal8Bit().data(), - sLocName.toLocal8Bit().data()); - #endif - } - } - } - #ifdef CONFIG_X11 - #ifdef CONFIG_XUNIQUE - m_pDisplay = NULL; - m_aUnique = 0; - m_wOwner = 0; - #if QT_VERSION >= 0x050100 - m_pXcbEventFilter = new qsynthXcbEventFilter(this); - installNativeEventFilter(m_pXcbEventFilter); - if (QX11Info::isPlatformX11()) { - #endif - // Instance uniqueness initialization... - m_pDisplay = QX11Info::display(); - m_aUnique = XInternAtom(m_pDisplay, QSYNTH_XUNIQUE, false); - XGrabServer(m_pDisplay); - m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique); - XUngrabServer(m_pDisplay); - #if QT_VERSION >= 0x050100 } - #endif - #endif // CONFIG_XUNIQUE - #endif // CONFIG_X11 } +#ifdef CONFIG_XUNIQUE +#if QT_VERSION < 0x050000 +#ifdef CONFIG_X11 + m_pDisplay = NULL; + m_aUnique = 0; + m_wOwner = 0; +#endif // CONFIG_X11 +#else + m_pMemory = NULL; + m_pServer = NULL; +#endif +#endif // CONFIG_XUNIQUE +} + - // Destructor. - ~qsynthApplication() - { - #ifdef CONFIG_X11 - #ifdef CONFIG_XUNIQUE - #if QT_VERSION >= 0x050100 - removeNativeEventFilter(m_pXcbEventFilter); - delete m_pXcbEventFilter; - #endif - #endif // CONFIG_XUNIQUE - #endif // CONFIG_X11 - if (m_pMyTranslator) delete m_pMyTranslator; - if (m_pQtTranslator) delete m_pQtTranslator; +// Destructor. +qsynthApplication::~qsynthApplication (void) +{ +#ifdef CONFIG_XUNIQUE +#if QT_VERSION >= 0x050000 + if (m_pServer) { + m_pServer->close(); + delete m_pServer; + m_pServer = NULL; } + if (m_pMemory) { + delete m_pMemory; + m_pMemory = NULL; +} +#endif +#endif // CONFIG_XUNIQUE + if (m_pMyTranslator) delete m_pMyTranslator; + if (m_pQtTranslator) delete m_pQtTranslator; +} - // Main application widget accessors. - void setMainWidget(QWidget *pWidget) - { - m_pWidget = pWidget; - #ifdef CONFIG_X11 - #ifdef CONFIG_XUNIQUE - m_wOwner = m_pWidget->winId(); - if (m_pDisplay && m_wOwner) { - XGrabServer(m_pDisplay); - XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime); - XUngrabServer(m_pDisplay); - } - #endif // CONFIG_XUNIQUE - #endif // CONFIG_X11 + +// Main application widget accessors. +void qsynthApplication::setMainWidget ( QWidget *pWidget ) +{ + m_pWidget = pWidget; +#ifdef CONFIG_XUNIQUE +#if QT_VERSION < 0x050000 +#ifdef CONFIG_X11 + m_wOwner = m_pWidget->winId(); + if (m_pDisplay && m_wOwner) { + XGrabServer(m_pDisplay); + XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime); + XUngrabServer(m_pDisplay); } +#endif // CONFIG_X11 +#endif +#endif // CONFIG_XUNIQUE +} - QWidget *mainWidget() const { return m_pWidget; } - // Check if another instance is running, - // and raise its proper main widget... - bool setup() - { - #ifdef CONFIG_X11 - #ifdef CONFIG_XUNIQUE - if (m_pDisplay && m_wOwner != None) { +// Check if another instance is running, +// and raise its proper main widget... +bool qsynthApplication::setup (void) +{ +#ifdef CONFIG_XUNIQUE +#if QT_VERSION < 0x050000 +#ifdef CONFIG_X11 + m_pDisplay = QX11Info::display(); + if (m_pDisplay) { + QString sUnique = QSYNTH_XUNIQUE; + char szHostName[255]; + if (::gethostname(szHostName, sizeof(szHostName)) == 0) { + sUnique += '@'; + sUnique += szHostName; + } + m_aUnique = XInternAtom(m_pDisplay, sUnique.toUtf8().constData(), false); + XGrabServer(m_pDisplay); + m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique); + XUngrabServer(m_pDisplay); + if (m_wOwner != None) { // First, notify any freedesktop.org WM // that we're about to show the main widget... Screen *pScreen = XDefaultScreenOfDisplay(m_pDisplay); @@ -247,105 +227,154 @@ // Done. return true; } - #endif // CONFIG_XUNIQUE - #endif // CONFIG_X11 - return false; } - -#ifdef CONFIG_X11 -#ifdef CONFIG_XUNIQUE - void x11PropertyNotify(Window w) - { - if (m_pDisplay && m_pWidget && m_wOwner == w) { - // Always check whether our property-flag is still around... - Atom aType; - int iFormat = 0; - unsigned long iItems = 0; - unsigned long iAfter = 0; - unsigned char *pData = 0; - if (XGetWindowProperty( - m_pDisplay, - m_wOwner, - m_aUnique, - 0, 1024, - false, - m_aUnique, - &aType, - &iFormat, - &iItems, - &iAfter, - &pData) == Success - && aType == m_aUnique && iItems > 0 && iAfter == 0) { - // Avoid repeating it-self... - XDeleteProperty(m_pDisplay, m_wOwner, m_aUnique); - // Just make it always shows up fine... - m_pWidget->show(); - m_pWidget->raise(); - m_pWidget->activateWindow(); - // FIXME: Do our best speciality, although it should be - // done iif configuration says so, we'll do it anyway! - qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); - if (pMainForm) - pMainForm->startAllEngines(); - } - // Free any left-overs... - if (iItems > 0 && pData) - XFree(pData); +#endif // CONFIG_X11 + return false; +#else + m_sUnique = QCoreApplication::applicationName(); + m_sUnique += '@'; + m_sUnique += QHostInfo::localHostName(); +#ifdef Q_OS_UNIX + m_pMemory = new QSharedMemory(m_sUnique); + m_pMemory->attach(); + delete m_pMemory; +#endif + m_pMemory = new QSharedMemory(m_sUnique); + bool bServer = false; + const qint64 pid = QCoreApplication::applicationPid(); + struct Data { qint64 pid; }; + if (m_pMemory->create(sizeof(Data))) { + m_pMemory->lock(); + Data *pData = static_cast<Data *> (m_pMemory->data()); + if (pData) { + pData->pid = pid; + bServer = true; } + m_pMemory->unlock(); } -#if QT_VERSION < 0x050000 - bool x11EventFilter(XEvent *pEv) - { - if (pEv->type == PropertyNotify - && pEv->xproperty.state == PropertyNewValue) - x11PropertyNotify(pEv->xproperty.window); - return QApplication::x11EventFilter(pEv); + else + if (m_pMemory->attach()) { + m_pMemory->lock(); // maybe not necessary? + Data *pData = static_cast<Data *> (m_pMemory->data()); + if (pData) + bServer = (pData->pid == pid); + m_pMemory->unlock(); } + if (bServer) { + QLocalServer::removeServer(m_sUnique); + m_pServer = new QLocalServer(); + m_pServer->setSocketOptions(QLocalServer::UserAccessOption); + m_pServer->listen(m_sUnique); + QObject::connect(m_pServer, + SIGNAL(newConnection()), + SLOT(newConnectionSlot())); + } else { + QLocalSocket socket; + socket.connectToServer(m_sUnique); + if (socket.state() == QLocalSocket::ConnectingState) + socket.waitForConnected(200); + if (socket.state() == QLocalSocket::ConnectedState) { + socket.write(QCoreApplication::arguments().join(' ').toUtf8()); + socket.flush(); + socket.waitForBytesWritten(200); + } + } + return !bServer; #endif -#endif // CONFIG_XUNIQUE -#endif // CONFIG_X11 +#else + return false; +#endif // !CONFIG_XUNIQUE +} + -private: +#ifdef CONFIG_XUNIQUE +#if QT_VERSION < 0x050000 +#ifdef CONFIG_X11 - // Translation support. - QTranslator *m_pQtTranslator; - QTranslator *m_pMyTranslator; +void qsynthApplication::x11PropertyNotify ( Window w ) +{ + if (m_pDisplay && m_pWidget && m_wOwner == w) { + // Always check whether our property-flag is still around... + Atom aType; + int iFormat = 0; + unsigned long iItems = 0; + unsigned long iAfter = 0; + unsigned char *pData = 0; + if (XGetWindowProperty( + m_pDisplay, + m_wOwner, + m_aUnique, + 0, 1024, + false, + m_aUnique, + &aType, + &iFormat, + &iItems, + &iAfter, + &pData) == Success + && aType == m_aUnique && iItems > 0 && iAfter == 0) { + // Avoid repeating it-self... + XDeleteProperty(m_pDisplay, m_wOwner, m_aUnique); + // Just make it always shows up fine... + m_pWidget->show(); + m_pWidget->raise(); + m_pWidget->activateWindow(); + // FIXME: Do our best speciality, although it should be + // done iif configuration says so, we'll do it anyway! + qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); + if (pMainForm) + pMainForm->startAllEngines(); + } + // Free any left-overs... + if (iItems > 0 && pData) + XFree(pData); + } +} - // Instance variables. - QWidget *m_pWidget; +bool qsynthApplication::x11EventFilter ( XEvent *pEv ) +{ + if (pEv->type == PropertyNotify + && pEv->xproperty.state == PropertyNewValue) + x11PropertyNotify(pEv->xproperty.window); + return QApplication::x11EventFilter(pEv); +} -#ifdef CONFIG_X11 -#ifdef CONFIG_XUNIQUE - Display *m_pDisplay; - Atom m_aUnique; - Window m_wOwner; -#if QT_VERSION >= 0x050100 - qsynthXcbEventFilter *m_pXcbEventFilter; -#endif -#endif // CONFIG_XUNIQUE #endif // CONFIG_X11 -}; +#else +// Local server conection slot. +void qsynthApplication::newConnectionSlot (void) +{ + QLocalSocket *pSocket = m_pServer->nextPendingConnection(); + QObject::connect(pSocket, + SIGNAL(readyRead()), + SLOT(readyReadSlot())); +} -#ifdef CONFIG_X11 -#ifdef CONFIG_XUNIQUE -#if QT_VERSION >= 0x050100 -// XCB Event filter (virtual processor). -bool qsynthXcbEventFilter::nativeEventFilter ( - const QByteArray& eventType, void *message, long * ) +// Local server data-ready slot. +void qsynthApplication::readyReadSlot (void) { - if (eventType == "xcb_generic_event_t") { - xcb_property_notify_event_t *pEv - = static_cast<xcb_property_notify_event_t *> (message); - if ((pEv->response_type & ~0x80) == XCB_PROPERTY_NOTIFY - && pEv->state == XCB_PROPERTY_NEW_VALUE) - m_pApp->x11PropertyNotify(pEv->window); + QLocalSocket *pSocket = qobject_cast<QLocalSocket *> (sender()); + if (pSocket) { + const qint64 nread = pSocket->bytesAvailable(); + if (nread > 0) { + QByteArray data = pSocket->read(nread); + // Just make it always shows up fine... + m_pWidget->hide(); + m_pWidget->show(); + m_pWidget->raise(); + m_pWidget->activateWindow(); + // FIXME: Do our best speciality, although it should be + // done iif configuration says so, we'll do it anyway! + qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); + if (pMainForm) + pMainForm->startAllEngines(); + } } - return false; } + #endif #endif // CONFIG_XUNIQUE -#endif // CONFIG_X11 //------------------------------------------------------------------------- @@ -423,7 +452,9 @@ #endif #endif qsynthApplication app(argc, argv); - +#if QT_VERSION >= 0x050600 + app.setAttribute(Qt::AA_EnableHighDpiScaling); +#endif // Construct default settings; override with command line arguments. qsynthOptions settings; if (!settings.parse_args(app.arguments())) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/qsynth.h new/qsynth-0.5.5/src/qsynth.h --- old/qsynth-0.5.4/src/qsynth.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qsynth-0.5.5/src/qsynth.h 2019-03-11 10:53:11.715169336 +0100 @@ -0,0 +1,130 @@ +// qsynth.h +// +/**************************************************************************** + Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved. + + This program 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 2 + of the License, or (at your option) any later version. + + This program 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 this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qsynth_h +#define __qsynth_h + +#include "qsynthAbout.h" + +#include <QApplication> + +#if QT_VERSION < 0x050000 +#if defined(Q_WS_X11) +#define CONFIG_X11 +#endif +#else +#if defined(QT_X11EXTRAS_LIB) +#define CONFIG_X11 +#endif +#endif + + +// Forward decls. +class QWidget; +class QTranslator; + +#if QT_VERSION < 0x050000 +#ifdef CONFIG_XUNIQUE +#ifdef CONFIG_X11 +#include <QX11Info> +typedef unsigned long Window; +typedef unsigned long Atom; +#endif // CONFIG_X11 +#endif // CONFIG_XUNIQUE +#else +#ifdef CONFIG_XUNIQUE +class QSharedMemory; +class QLocalServer; +#endif // CONFIG_XUNIQUE +#endif + + +//------------------------------------------------------------------------- +// Singleton application instance stuff (Qt/X11 only atm.) +// + +class qsynthApplication : public QApplication +{ + Q_OBJECT + +public: + + // Constructor. + qsynthApplication(int& argc, char **argv); + + // Destructor. + ~qsynthApplication(); + + // Main application widget accessors. + void setMainWidget(QWidget *pWidget); + QWidget *mainWidget() const + { return m_pWidget; } + + // Check if another instance is running, + // and raise its proper main widget... + bool setup(); + +#if QT_VERSION < 0x050000 +#ifdef CONFIG_XUNIQUE +#ifdef CONFIG_X11 + void x11PropertyNotify(Window w); + bool x11EventFilter(XEvent *pEv) +#endif // CONFIG_X11 +#endif // CONFIG_XUNIQUE +#else +#ifdef CONFIG_XUNIQUE +protected slots: + // Local server slots. + void newConnectionSlot(); + void readyReadSlot(); +#endif // CONFIG_XUNIQUE +#endif + +private: + + // Translation support. + QTranslator *m_pQtTranslator; + QTranslator *m_pMyTranslator; + + // Instance variables. + QWidget *m_pWidget; + +#if QT_VERSION < 0x050000 +#ifdef CONFIG_XUNIQUE +#ifdef CONFIG_X11 + Display *m_pDisplay; + Atom m_aUnique; + Window m_wOwner; +#endif // CONFIG_X11 +#endif // CONFIG_XUNIQUE +#else +#ifdef CONFIG_XUNIQUE + QString m_sUnique; + QSharedMemory *m_pMemory; + QLocalServer *m_pServer; +#endif // CONFIG_XUNIQUE +#endif +}; + + +#endif // __qsynth_h + +// end of qsynth.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/qsynthAbout.h new/qsynth-0.5.5/src/qsynthAbout.h --- old/qsynth-0.5.4/src/qsynthAbout.h 2018-12-05 17:10:36.346638996 +0100 +++ new/qsynth-0.5.5/src/qsynthAbout.h 2019-03-11 10:53:11.715169336 +0100 @@ -1,7 +1,7 @@ // qsynthAbout.h // /**************************************************************************** - Copyright (C) 2003-2018, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -28,7 +28,7 @@ #define QSYNTH_SUBTITLE "A fluidsynth Qt GUI Interface" #define QSYNTH_WEBSITE "https://qsynth.sourceforge.io" -#define QSYNTH_COPYRIGHT "Copyright (C) 2003-2018, rncbc aka Rui Nuno Capela. All rights reserved." +#define QSYNTH_COPYRIGHT "Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved." #define QSYNTH_DOMAIN "rncbc.org" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/src.pri.in new/qsynth-0.5.5/src/src.pri.in --- old/qsynth-0.5.4/src/src.pri.in 2018-12-05 17:10:36.349638996 +0100 +++ new/qsynth-0.5.5/src/src.pri.in 2019-03-11 10:53:11.718169336 +0100 @@ -16,10 +16,8 @@ QMAKE_CXXFLAGS += @ac_cflags@ QMAKE_LFLAGS += @ac_ldflags@ -# X11 support -unix:!macx { - QX11EXTRAS = @ac_qx11extras@ - !isEmpty(QX11EXTRAS) { - QT += x11extras - } +# Network support +QNETWORK = @ac_qnetwork@ +!isEmpty(QNETWORK) { + QT += network } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qsynth-0.5.4/src/src.pro new/qsynth-0.5.5/src/src.pro --- old/qsynth-0.5.4/src/src.pro 2018-12-05 17:10:36.349638996 +0100 +++ new/qsynth-0.5.5/src/src.pro 2019-03-11 10:53:11.718169336 +0100 @@ -10,6 +10,7 @@ #DEFINES += DEBUG HEADERS += config.h \ + qsynth.h \ qsynthAbout.h \ qsynthEngine.h \ qsynthChannels.h \