diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-09-18 11:25:05 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-09-19 09:44:36 +0200 |
commit | b7d1371910dad02c05bfd9ecd65a73de97871b9c (patch) | |
tree | 9bdcb3083f1c0df40505848bfe9930be2b7fb873 /vcl/inc/qt5 | |
parent | 56ac8214ab35387f8861044b62c79fae6d7ccac5 (diff) |
Qt5 minimal initial fix for Java UNO
This is just a minimal fix for Qt errors from JunitTest_svx_unoapi,
which was manipulating Qt5Timer and other timers, resulting in a
spew of timer error messages like:
QObject::killTimer: Timers cannot be stopped from another thread
QObject::startTimer: Timers cannot be started from another thread
QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
Eventually all the QWidget manipulation in the Qt5Frame must be
redirected to the main thread, just like Qt5FilePicker already does.
Change-Id: I66054e6c90f99d27bd5818dcaa5876c515867f77
Reviewed-on: https://gerrit.libreoffice.org/60672
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/qt5')
-rw-r--r-- | vcl/inc/qt5/Qt5Frame.hxx | 12 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5Timer.hxx | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx index 0eb796330e38..577a9cce2fde 100644 --- a/vcl/inc/qt5/Qt5Frame.hxx +++ b/vcl/inc/qt5/Qt5Frame.hxx @@ -27,6 +27,8 @@ #include <headless/svpgdi.hxx> #include <vcl/svapp.hxx> +#include <QtCore/QObject> + class Qt5Graphics; class Qt5Instance; class Qt5Menu; @@ -37,8 +39,10 @@ class QScreen; class QImage; class SvpSalGraphics; -class VCLPLUG_QT5_PUBLIC Qt5Frame : public SalFrame +class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame { + Q_OBJECT + friend class Qt5Widget; QWidget* m_pQWidget; @@ -90,6 +94,12 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public SalFrame void TriggerPaintEvent(); void TriggerPaintEvent(QRect aRect); +private Q_SLOTS: + void setVisible(bool); + +Q_SIGNALS: + void setVisibleSignal(bool); + public: Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nSalFrameStyle, bool bUseCairo); virtual ~Qt5Frame() override; diff --git a/vcl/inc/qt5/Qt5Timer.hxx b/vcl/inc/qt5/Qt5Timer.hxx index 43613d8cf4a1..9d68f0b200c5 100644 --- a/vcl/inc/qt5/Qt5Timer.hxx +++ b/vcl/inc/qt5/Qt5Timer.hxx @@ -30,10 +30,12 @@ class Qt5Timer final : public QObject, public SalTimer private Q_SLOTS: void timeoutActivated(); - void startTimer(); + void startTimer(int); + void stopTimer(); Q_SIGNALS: - void startTimerSignal(); + void startTimerSignal(int); + void stopTimerSignal(); public: Qt5Timer(); |