--- cloudbagclient-2.2.4.orig/debian/compat
+++ cloudbagclient-2.2.4/debian/compat
@@ -0,0 +1,1 @@
+9
--- cloudbagclient-2.2.4.orig/debian/libcloudbagsync0.preinst
+++ cloudbagclient-2.2.4/debian/libcloudbagsync0.preinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+#
+# emulate apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall
+# Try to capture the new config file as it whisses by, to be picked up by postinst
+conf=/etc/cloudbag/sync-exclude.lst
+if [ ! -s $conf ]; then
+  mkdir -p /etc/cloudbag
+  ln -s none $conf.dpkg-tmp
+  ln -s none $conf.dpkg-new
+fi
+
+#DEBHELPER#
+exit 0
--- cloudbagclient-2.2.4.orig/debian/format
+++ cloudbagclient-2.2.4/debian/format
@@ -0,0 +1,1 @@
+3.0 (quilt)
--- cloudbagclient-2.2.4.orig/debian/cloudbag-client-nautilus.install
+++ cloudbagclient-2.2.4/debian/cloudbag-client-nautilus.install
@@ -0,0 +1,1 @@
+usr/share/nautilus-python/extensions/syncstate.py*
--- cloudbagclient-2.2.4.orig/debian/control
+++ cloudbagclient-2.2.4/debian/control
@@ -0,0 +1,96 @@
+Source: cloudbag-client
+Section: devel
+Priority: optional
+Maintainer: Tnet Italia <apps@tnet.it>
+Standards-Version: 3.9.6
+Build-Depends: debhelper (>= 9), cmake, sed, doxygen, unzip | bash,
+	libsqlite3-dev, python-sphinx | python3-sphinx, libssl-dev,
+	libqtwebkit-dev (>= 2.2.0) | libqt5webkit5-dev (>= 2.2.0),
+	qtkeychain-dev (>= 0.7.0) | qt5keychain-dev (>= 0.7.0)
+
+Package: cloudbag-client
+Architecture: any
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}, libcloudbagsync0 (= ${binary:Version}), cloudbag-client-l10n,
+	libqt4-sql-sqlite | libqt5sql5-sqlite
+Description:  The cloudbag sync client - github.com/cloudbag/client
+ .
+ cloudbag client enables you to connect to your private
+ cloudbag Server. With it you can create folders in your home
+ directory, and keep the contents of those folders synced with your
+ cloudbag server. Simply copy a file into the directory and the
+ cloudbag Client does the rest.
+ .
+ cloudbag gives your employees anytime, anywhere access to the files
+ they need to get the job done, whether through this desktop application,
+ our mobile apps, the web interface, or other WebDAV clients. With it,
+ your employees can easily view and share documents and information
+ critical to the business, in a secure, flexible and controlled
+ architecture. You can easily extend cloudbag with plug-ins from the
+ community, or that you build yourself to meet the requirements of
+ your infrastructure and business.
+ .
+ cloudbag - Your Cloud, Your Data, Your Way!  www.cloudbag.it
+
+
+
+#Package: cloudbag-client-doc
+#Architecture: all
+#Section: devel
+#Depends: cloudbag-client (= ${binary:Version}), ${misc:Depends}, libcloudbagsync0
+#Suggests: cloudbag-client-nautilus
+#Description: development files for the cloudbag sync lib
+# Main package for cloudbag.
+# .
+# This package contains the library development files.
+
+Package: cloudbag-client-l10n
+Architecture: all
+Section: devel
+Depends: cloudbag-client (>= ${binary:Version}), ${misc:Depends}, libcloudbagsync0
+Breaks: cloudbag-client (<= 1.5.0)
+Description: Internationalization files for cloudbag
+ Internationalization for cloudbag desktop sync client.
+ .
+ This package contains the translation packages.
+
+Package: libcloudbagsync0
+Architecture: any
+Multi-Arch: same
+Section: devel
+Depends: ${misc:Depends}, ${shlibs:Depends},
+	libqtkeychain1 (>= 0.7.0) | libqt5keychain1 (>= 0.7.0)
+Pre-Depends: ${misc:Pre-Depends}
+Breaks: libocsync0
+Replaces: libocsync0
+Description: the cloudbag sync library
+ cloudbag uses this as a sync engine implementation.
+ .
+ This package contains the library.
+
+Package: libcloudbagsync-dev
+Architecture: any
+Section: devel
+Depends: libcloudbagsync0 (= ${binary:Version}), ${misc:Depends}
+Description: development files for the cloudbag sync library
+ cloudbag uses this as a sync engine implementation.
+ .
+ This package contains the development files.
+
+Package: cloudbag-client-nautilus
+Architecture: all
+Section: devel
+Depends: cloudbag-client (= ${binary:Version}), ${misc:Depends}, libcloudbagsync0, python-nautilus, nautilus
+Description: nautilus plugin for cloudbag
+ This package contains a nautilus plugin to display overlay icons.
+ .
+ This is a nice gui feature.
+
+Package: cloudbag-client-nemo
+Architecture: all
+Section: devel
+Depends: cloudbag-client (= ${binary:Version}), ${misc:Depends}, libcloudbagsync0, python-nemo, nemo
+Description: Nemo plugin for cloudbag
+ This package contains a nemo plugin to display overlay icons.
+ .
+ This is a nice gui feature.
--- cloudbagclient-2.2.4.orig/debian/libcloudbagsync0.install
+++ cloudbagclient-2.2.4/debian/libcloudbagsync0.install
@@ -0,0 +1,3 @@
+etc/cloudbag*
+usr/lib/*/libcloudbagsync.so.*
+usr/lib/*/*/libocsync.so.*
--- cloudbagclient-2.2.4.orig/debian/cloudbag-client-nemo.install
+++ cloudbagclient-2.2.4/debian/cloudbag-client-nemo.install
@@ -0,0 +1,1 @@
+usr/share/nemo-python/extensions/syncstate.py*
--- cloudbagclient-2.2.4.orig/debian/cloudbag-client.install
+++ cloudbagclient-2.2.4/debian/cloudbag-client.install
@@ -0,0 +1,3 @@
+usr/bin/cloudbag*
+usr/share/applications/cloudbag.desktop
+usr/share/icons/hicolor
--- cloudbagclient-2.2.4.orig/debian/cloudbag-client-dev.install
+++ cloudbagclient-2.2.4/debian/cloudbag-client-dev.install
@@ -0,0 +1,2 @@
+usr/include/cloudbagsync
+usr/lib*/libcloudbagsync.so
--- cloudbagclient-2.2.4.orig/debian/cloudbag-client.lintian-overrides
+++ cloudbagclient-2.2.4/debian/cloudbag-client.lintian-overrides
@@ -0,0 +1,3 @@
+cloudbag-client: arch-dependent-file-not-in-arch-specific-directory
+cloudbag-client: binary-or-shlib-defines-rpath
+cloudbag-client: possible-gpl-code-linked-with-openssl
--- cloudbagclient-2.2.4.orig/debian/source.lintian-overrides
+++ cloudbagclient-2.2.4/debian/source.lintian-overrides
@@ -0,0 +1,7 @@
+# needed for Debian 8.0 to finsh a build in obs.
+# FIXME: all that should be warnings in obs, as they are in s2 and local builds.
+cloudbag-client source: not-binnmuable-all-depends-any
+# cloudbag-client: binary-or-shlib-defines-rpath usr/bin/cloudbag /usr/lib/x86_64-linux-gnu/cloudbag
+cloudbag-client: binary-or-shlib-defines-rpath
+# cloudbag-client: arch-dependent-file-not-in-arch-specific-directory usr/bin/cloudbag
+cloudbag-client: arch-dependent-file-not-in-arch-specific-directory
--- cloudbagclient-2.2.4.orig/debian/cloudbag-client-l10n.install
+++ cloudbagclient-2.2.4/debian/cloudbag-client-l10n.install
@@ -0,0 +1,1 @@
+usr/share/cloudbag/i18n/*qm
--- cloudbagclient-2.2.4.orig/debian/rules
+++ cloudbagclient-2.2.4/debian/rules
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+export DROOT=$(CURDIR)/debian/cloudbag-client
+export SRCDIR=/usr/src/packages/SOURCES
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+SHELL=/bin/bash
+
+%:
+	dh $@
+
+override_dh_auto_configure:
+	# not sure, when which variables are set.
+	echo source:Version=${source:Version}
+	echo source:Upstream-Version=${source:Upstream-Version}
+	echo binary:Version=${binary:Version}
+
+	# protect against poisonous tar-balls.
+	if [ -d binary ]; then ls -la; echo; echo "A top level directory named 'binary' exists. This kills dpkg-genchangelog."; echo; echo "Please remove that directory."; echo; echo; exit 1; fi
+
+	git_defs=(); \
+	if [ -n "%nil" -a "%nil" != "%nil" ]; then \
+	  git_defs=('-DMIRALL_VERSION_SUFFIX=%nil' '-DMIRALL_VERSION_BUILD=1917'); \
+	fi; \
+	dh_auto_configure -- "$${git_defs[@]}" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/cloudbag-client -DSYSCONF_INSTALL_DIR=/etc -DWITH_DOC=FALSE -DCMAKE_SKIP_RPATH=FALSE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DOEM_THEME_DIR=$(CURDIR)/cloudbag/syncclient
+
+override_dh_auto_install:
+	# survive at Ubuntu_16.04
+	mkdir -p $(CURDIR)/usr/share/cloudbag/i18n
+	echo 3cb86418caef9c95cd211cbf60a1bddd88000000020101 | xxd -r -p > $(CURDIR)/usr/share/cloudbag/i18n/client_en.qm
+	dh_auto_install -Xdebian
+	install -m 0755 -D $(SRCDIR)/100-sync-inotify.conf $(DROOT)/etc/sysctl.d/100-sync-inotify.conf
+	if [ -f $(SRCDIR)/l10n.zip ]; then cd $(CURDIR)/usr/share/cloudbag ; unzip -o $(SRCDIR)/l10n.zip; fi || true
+
--- cloudbagclient-2.2.4.orig/debian/changelog
+++ cloudbagclient-2.2.4/debian/changelog
@@ -0,0 +1,12 @@
+cloudbag-client (2.2.4-32.1) stable; urgency=medium
+
+  * version number update by debtransform
+
+ -- debtransform <build@opensuse.org>  Mon, 27 Feb 2017 08:03:54 +0000
+
+cloudbag-client (2.2.4) stable; urgency=medium
+
+  * fix missing translations, by adding a separate zip.
+
+
+ -- Tnet Italia <apps@tnet.it>  Thu, 24 Jun 2016 11:00:00 +0200
--- cloudbagclient-2.2.4.orig/debian/libcloudbagsync-dev.install
+++ cloudbagclient-2.2.4/debian/libcloudbagsync-dev.install
@@ -0,0 +1,3 @@
+usr/lib/*/libcloudbagsync.so
+usr/lib/*/*/libocsync.so
+usr/include/cloudbagsync/
--- cloudbagclient-2.2.4.orig/debian/libcloudbagsync0.postinst
+++ cloudbagclient-2.2.4/debian/libcloudbagsync0.postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+#
+# emulate apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall
+# Try to harvest any captured config files captured in preinst.
+conf=/etc/cloudbag/sync-exclude.lst
+if [ ! -s $conf -a -s $conf.dpkg-new ]; then
+  rm -f $conf
+  echo "$0: Installing new config file $conf"
+  mv $conf.dpkg-new $conf || true
+fi
+
+
+#DEBHELPER#
+exit 0
--- cloudbagclient-2.2.4.orig/debian/cloudbag-doc.dirs
+++ cloudbagclient-2.2.4/debian/cloudbag-doc.dirs
@@ -0,0 +1,1 @@
+usr/share/doc
--- cloudbagclient-2.2.4.orig/debian/libcloudbagsync0.lintian-overrides
+++ cloudbagclient-2.2.4/debian/libcloudbagsync0.lintian-overrides
@@ -0,0 +1,1 @@
+libcloudbagsync0: possible-gpl-code-linked-with-openssl
--- cloudbagclient-2.2.4.orig/debian/copyright
+++ cloudbagclient-2.2.4/debian/copyright
@@ -0,0 +1,4 @@
+Files: *
+Copyright: 2012-2015 ownCloud, inc.; Nuernberg, Germany.
+License: GPL-2+
+ See /usr/share/common-licenses/GPL-2
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 727d3bd..151f7b8 100644
--- cloudbagclient-2.2.4.orig/src/gui/accountsettings.cpp
+++ cloudbagclient-2.2.4/src/gui/accountsettings.cpp
@@ -159,7 +159,13 @@ void AccountSettings::createAccountToolbox()
 
 void AccountSettings::slotOpenAccountWizard()
 {
-    if (QSystemTrayIcon::isSystemTrayAvailable()) {
+    if (
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+            qgetenv("QT_QPA_PLATFORMTHEME") == "appmenu-qt5" ||
+                // We can't call isSystemTrayAvailable with appmenu-qt5 because it breaks the systemtray
+                // (issue #4693, #4944)
+#endif
+            QSystemTrayIcon::isSystemTrayAvailable()) {
         topLevelWidget()->close();
     }
 #ifdef Q_OS_MAC
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index d4d41c5..6373da4 100644
--- cloudbagclient-2.2.4.orig/src/gui/generalsettings.cpp
+++ cloudbagclient-2.2.4/src/gui/generalsettings.cpp
@@ -161,12 +161,4 @@ void GeneralSettings::slotIgnoreFilesEditor()
     }
 }
 
-void GeneralSettings::slotOpenAccountWizard()
-{
-    if (QSystemTrayIcon::isSystemTrayAvailable()) {
-        topLevelWidget()->close();
-    }
-    OwncloudSetupWizard::runWizard(qApp, SLOT(slotownCloudWizardDone(int)), 0);
-}
-
 } // namespace OCC
diff --git a/src/gui/generalsettings.h b/src/gui/generalsettings.h
index 74c297f..69c96c4 100644
--- cloudbagclient-2.2.4.orig/src/gui/generalsettings.h
+++ cloudbagclient-2.2.4/src/gui/generalsettings.h
@@ -44,7 +44,6 @@ private slots:
     void slotToggleOptionalDesktopNotifications(bool);
     void slotUpdateInfo();
     void slotIgnoreFilesEditor();
-    void slotOpenAccountWizard();
 
 private:
     void loadMiscSettings();
