summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2019-03-08new loplugin constvarsNoel Grandin
detect static variables that can be made const. Thanks to mike kaganski for suggesting this. Here I introduce a new plugin feature - using markers in nearby comments to disable the plugin for specific vars. Some of this stuff was old debugging code. I removed the stuff that was older than 5 years. Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c Reviewed-on: https://gerrit.libreoffice.org/68807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07map reorderable to DragDropMode::CTRL_MOVECaolán McNamara
workaround baseclass NotifyStartDrag weirdness rather than risk changing it Change-Id: I70b56a913e6192da9b3a57653924dcc4160352c0 Reviewed-on: https://gerrit.libreoffice.org/68879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-07tdf#119947 vcl opengl win: fix fontwork popup menuMiklos Vajna
Regression from commit b160db926b574b7e9d6696d49dbbce8dd289aade (tdf#96947 vcl opengl win: fix background of menu items w/ check/radio marks, 2018-05-14), the problem was that GetMenuPopupMarkRegion() did an unconditional downcast from ImplControlValue to MenupopupValue. This looked safe, but when the extracted function was used in WinSalGraphics::drawNativeControl(), then that argument was not safe to downcast. Fix the problem by switching to safe downcast, and returning an empty rectangle (instead of a bogus one) on error. This way the old bug stays fixed but fontwork popup menu works again as well. Change-Id: I2b69b9f2e6823850892ac73df78dac5c2f04ec03 Reviewed-on: https://gerrit.libreoffice.org/68883 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-03-07don't need "spinbox-entire" svg anymoreTomaž Vajngerl
Change-Id: I8385acf7ecd46b7c8b990abb688bd2ddddcb6bc5 Reviewed-on: https://gerrit.libreoffice.org/68867 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07widget theme - update editbox, draw from svgTomaž Vajngerl
Change-Id: I0dfdaaf74c9b31ecd9b1de511b48dacf2e90f59f Reviewed-on: https://gerrit.libreoffice.org/68866 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07widget theme - update combobox/listbox, draw from svgTomaž Vajngerl
Change-Id: Ie5e28883d70ad61340c58bcacd8c2ffb2ced1536 Reviewed-on: https://gerrit.libreoffice.org/68865 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07widget theme - update scrollbars, draw from svgTomaž Vajngerl
Change-Id: I7e7cd05ce516ab24d380bb8b6a264fd45e1d553c Reviewed-on: https://gerrit.libreoffice.org/68864 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07widget theme - update spinbox with more statesTomaž Vajngerl
Change-Id: I398293c30e015eeb53b8403f1e6fc628227de9ac Reviewed-on: https://gerrit.libreoffice.org/68863 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07Fixes, don't draw IntroProgress, adjust EditBox bounding sizeTomaž Vajngerl
Change-Id: I1d1944faed05ec3753709e39fa1a820d795e26d5 Reviewed-on: https://gerrit.libreoffice.org/68862 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07can drop wallpaper if use alpha-enabled virdevCaolán McNamara
Change-Id: I655dca755ed8e1c1266c191f61998b3838fe9797 Reviewed-on: https://gerrit.libreoffice.org/68860 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-07Add width, height and margin parameters for widget part def.Tomaž Vajngerl
For some control parts we need to provide the size or redefine the size. Previously this was hardcoded, but this adds new attriburtes for widget part definition: - width, height: defines size for buttons in spinbox, the size of the checkbox or radiobutton - margin-width, margin-height: increases the size (margin) of tab items by the specified amount Change-Id: Ieea69b92ad21adc4f4954e7555f4d59348f5dea8 Reviewed-on: https://gerrit.libreoffice.org/68829 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07Make definition state attribute default to "any"Tomaž Vajngerl
...and remove all the "any" from definition.xml Change-Id: I8a91129c89255c83c1c2f975bf9acb710b664efc Reviewed-on: https://gerrit.libreoffice.org/68828 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Increase font size when drawing from widget definitionTomaž Vajngerl
Change-Id: I983dde507758a42c6ce421ea970b6e5d54c5dcae Reviewed-on: https://gerrit.libreoffice.org/68826 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06draw combobox (entire areaonly) from external svg, fix editboxTomaž Vajngerl
Change-Id: Iba7e5b45c4f1ac6f87cbca963bb5284ce810ebcf Reviewed-on: https://gerrit.libreoffice.org/68825 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Draw tabs from external svg image, fixes for tabs (colors)Tomaž Vajngerl
Change-Id: I35db7b8e36c474d2196bfae1ec4dd352e17d2a14 Reviewed-on: https://gerrit.libreoffice.org/68822 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Draw pushbutton from external svg imageTomaž Vajngerl
Change-Id: I45d668636d607e09852ee0ff3144500ac03fb8cf Reviewed-on: https://gerrit.libreoffice.org/68819 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Update drawing of spinbox from definitionTomaž Vajngerl
Use SVG to describe the left, right spin button and the entire spinbox widget. Change-Id: I082ee08942fa3fa4145fd7bf53fc2cfc9fc06fd2 Reviewed-on: https://gerrit.libreoffice.org/68818 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Support first, last tab item for the widget definitionTomaž Vajngerl
Add "extra" parameter for the widget definition states with the default set to "any". For tab item, the extra parameter can be "first", "last", "middle" and "first_last" (only one). This is needed to draw first and last tab item differently. Change-Id: I46b6897b485b4df94ab6fe9521925c3715eaa24e Reviewed-on: https://gerrit.libreoffice.org/68817 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Support drawing widgets by interpreting an external SVG definitionTomaž Vajngerl
This uses SvgDrawVisitor and draw commands to draw widgets from an "external" SVG file. The difference to normal SVG drawing is that the shapes are adjusted and not just resized to the widget size. The result of such adjusted drawing is that the margins are preserved exactly just the dimensions of the shapes is adjusted to the desired size (if the shape bounding rectangle starts at {5,5}, so will also when it is adjusted), also the stroke widths are completely preserved. This enables us to use SVG to define also for dynamic widgets, like for example entry fields, listboxes, comboboxes,... which vary in size - depending on the dialog definition. Change-Id: I26fc9a37539d3675a77b48660d235a8a55b81156 Reviewed-on: https://gerrit.libreoffice.org/68816 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Draw basic list{node,net,header} from the theme definitionTomaž Vajngerl
Change-Id: I05b2cced0f99d6628a12465748820e3a87c5f3e7 Reviewed-on: https://gerrit.libreoffice.org/68774 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Draw basic toolbar from the theme definitionTomaž Vajngerl
Change-Id: I4d9935973bb6e46a7c5f17f914944f91a3e10a63 Reviewed-on: https://gerrit.libreoffice.org/68773 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Draw basic frame and window background from the theme definitionTomaž Vajngerl
Change-Id: I2422650a155a874855ad4d72fa3bfd27b7d0da8a Reviewed-on: https://gerrit.libreoffice.org/68772 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06Draw basic listbox from the theme definitionTomaž Vajngerl
Change-Id: Id3dd5aaa8b5537e5f740752cec292d6f4a44044e Reviewed-on: https://gerrit.libreoffice.org/68771 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06support large toolbar sizeCaolán McNamara
Change-Id: If24baee9a682006ff92e543eeb28490573b6cdec Reviewed-on: https://gerrit.libreoffice.org/68805 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-06hookup MenuButton::SetDropDown to GtkMenuButton draw-indicatorCaolán McNamara
Change-Id: I556d61256bed8f607eed5a9c6e0ed3fcfd63af2c Reviewed-on: https://gerrit.libreoffice.org/68802 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-06Introduce Int32ToSVBT32 for cases that apparently want to write a signed valueStephan Bergmann
...and clean up some other (legitimate) uses of UInt32ToSVBT32 to not use a (somewhat misleading) static_cast<long>(...) Change-Id: Ifd0c3f771c3f6e20eef3413b9c27fd2514dc0c13 Reviewed-on: https://gerrit.libreoffice.org/68767 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-06remove some unnecessary typedef struct... sugarNoel Grandin
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Use o3tl::is_typed_flags for ControlStateStephan Bergmann
Change-Id: If54f385e8c7e19106f03f4a52f99bc50b4878f37 Reviewed-on: https://gerrit.libreoffice.org/68760 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05deal with code duplication at drawing from a definition fileTomaž Vajngerl
Change-Id: Ie2f6ace37562a251d639c5049c91a4ba09576c0b Reviewed-on: https://gerrit.libreoffice.org/68754 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Add spinbox SVG buttons, but use a definition draw for nowTomaž Vajngerl
Change-Id: Iff40c7c315ed2473e7a5bd84a6449aedcf646e2f Reviewed-on: https://gerrit.libreoffice.org/68753 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic tabbar widgets from the theme definitionTomaž Vajngerl
Change-Id: I51f8868abff3f3e38bd70ea1fc99a9cf5aca92a6 Reviewed-on: https://gerrit.libreoffice.org/68752 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic progress from the theme definitionTomaž Vajngerl
Change-Id: If2c6f434dd64cf1b3bab340dc6c4d73f439bcfdf Reviewed-on: https://gerrit.libreoffice.org/68751 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic fixedline from the theme definitionTomaž Vajngerl
Change-Id: I791d33e4cea14f49609434e39f681cf47864fc67 Reviewed-on: https://gerrit.libreoffice.org/68750 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic scrollbar from the theme definitionTomaž Vajngerl
Change-Id: I2a017746f02c547413c949a1728ebbfa781a7f66 Reviewed-on: https://gerrit.libreoffice.org/68749 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05weld SfxAcceleratorConfigPageCaolán McNamara
fixes a leak in the KeyList too Change-Id: I603218ff99481bc006df329c770ea6fe6f147483 Reviewed-on: https://gerrit.libreoffice.org/68694 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05sync get_active_id implsCaolán McNamara
Change-Id: I6b0595f6386657afa28b2cb249ea69aa51e5fb4a Reviewed-on: https://gerrit.libreoffice.org/68740 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05Draw basic slider from the theme definitionTomaž Vajngerl
Change-Id: I5ccd6c2e743324cee2a030e55425df4791e12e2f Reviewed-on: https://gerrit.libreoffice.org/68719 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Use a unordered_map for mapping of xml element to control typeTomaž Vajngerl
Change-Id: Id0409f35a21307ed41a0da27c625c4b7784811d6 Reviewed-on: https://gerrit.libreoffice.org/68718 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Update checkbox and radiobutton SVG imagesTomaž Vajngerl
Change-Id: I5e9d5c9fb71340b55145bd2db09cd43982fbb275 Reviewed-on: https://gerrit.libreoffice.org/68717 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic spinbox from the theme definitionTomaž Vajngerl
Change-Id: I9b8379846a82f51365da7e7e2fd63cc21eb575a2 Reviewed-on: https://gerrit.libreoffice.org/68714 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Use SVG image to draw the checkbox widgetTomaž Vajngerl
Change-Id: I559ac167970581477bf9f9a02904b11050e31766 Reviewed-on: https://gerrit.libreoffice.org/68713 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05tdf#123745 vcl: fix some crash in Window::SetHelpHdl()Michael Stahl
Qt5 has some QEvent::DeferredDelete thing, perhaps that's why it calls this on a disposed Window? 0 vcl::Window::SetHelpHdl(Link<vcl::Window&, bool> const&) (this=0x60cf9e0, rLink=...) at vcl/source/window/window.cxx:1825 1 SalInstanceWindow::clear_child_help(vcl::Window*) (this=0x7fa40c0, pParent=0x60cf9e0) at vcl/source/app/salvtables.cxx:825 2 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at vcl/source/app/salvtables.cxx:962 3 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at vcl/source/app/salvtables.cxx:963 4 std::default_delete<weld::Window>::operator()(weld::Window*) const (this=0x60d0b90, __ptr=0x7fa4190) at /usr/include/c++/8/bits/unique_ptr.h:81 5 std::unique_ptr<weld::Window, std::default_delete<weld::Window> >::~unique_ptr() (this=0x60d0b90, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:274 6 SalFrame::~SalFrame() (this=0x60d0b40, __in_chrg=<optimized out>) at vcl/source/app/salvtables.cxx:73 7 Qt5Frame::~Qt5Frame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/qt5/Qt5Frame.cxx:167 8 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/unx/kde5/KDE5SalFrame.hxx:34 9 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/unx/kde5/KDE5SalFrame.hxx:34 10 QObject::event(QEvent*) (this=0x60d0b30, e=<optimized out>) at kernel/qobject.cpp:1242 Change-Id: I2ac8cb24924ea3178c2b3eed14350515d8506ec3 Reviewed-on: https://gerrit.libreoffice.org/68581 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: convert Qt5FilePicker and Qt5Menu to RunInMainThreadMichael Stahl
... and also convert KDE5FilePicker. And Qt5Frame. The UNO methods in Qt5FilePicker/KDE5FilePicker have to ensure that the thread actually owns SolarMutex, because if RunInMainThread() is called without that it will deadlock. Change-Id: Ie4d2f494ac81c799ec7c9a3acb3a9b0f77bb6361 Reviewed-on: https://gerrit.libreoffice.org/68357 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: fix Qt warning Qt5Frame::SetModal()Michael Stahl
This prints a warning "Cannot create children for a parent that is in a different thread"; let's fix it before it causes another hard to debug crash. 0 check_parent_thread(QObject*, QThreadData*, QThreadData*) (parent=parent@entry=0xe88ca0, parentThreadData=<optimized out>, currentThreadData=<optimized out>) at kernel/qobject.cpp:781 1 check_parent_thread (currentThreadData=<optimized out>, parentThreadData=<optimized out>, parent=0xe88ca0) at kernel/qobject.cpp:822 2 QObject::QObject(QObject*) (this=0x9ed2e80, parent=0xe88ca0) at kernel/qobject.cpp:810 3 Adwaita::GenericData::GenericData(QObject*, QWidget*, int) () at /usr/lib64/qt5/plugins/styles/adwaita.so 4 Adwaita::WidgetStateEngine::registerWidget(QWidget*, QFlags<Adwaita::AnimationMode>) () at /usr/lib64/qt5/plugins/styles/adwaita.so 5 Adwaita::Animations::registerWidget(QWidget*) const () at /usr/lib64/qt5/plugins/styles/adwaita.so 6 Adwaita::Style::polish(QWidget*) () at /usr/lib64/qt5/plugins/styles/adwaita.so 7 QWidget::event(QEvent*) () at /lib64/libQt5Widgets.so.5 8 Qt5Widget::event(QEvent*) (this=0x7321790, pEvent=0x7f90c27d3750) at vcl/qt5/Qt5Widget.cxx:416 9 QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5 10 QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5 11 QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7321790, event=0x7f90c27d3750) at kernel/qcoreapplication.cpp:1047 12 QWidget::ensurePolished() const () at /lib64/libQt5Widgets.so.5 13 QWidget::setVisible(bool) () at /lib64/libQt5Widgets.so.5 14 Qt5Frame::SetModal(bool) (this=0x9f411b0, bModal=true) at vcl/qt5/Qt5Frame.cxx:482 Change-Id: Ib6b4d1ee859dfce650422a6c7860abf2eb2686f1 Reviewed-on: https://gerrit.libreoffice.org/68356 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: fix Qt5FilePicker destructor to run in main threadMichael Stahl
During QFileDialog dtor, QSocketNotifier::setEnabled(false) is called, but it doesn't do anything other than print a stupid warning and so it's still registered and later it receives events after it's dead. 0 QSocketNotifier::setEnabled(bool) (this=this@entry=0x991c058, enable=enable@entry=false) at kernel/qsocketnotifier.cpp:240 1 QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() (this=0x991c030, __in_chrg=<optimized out>) at io/qfilesystemwatcher_inotify.cpp:260 2 QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() (this=0x991c030, __in_chrg=<optimized out>) at io/qfilesystemwatcher_inotify.cpp:258 3 QObjectPrivate::deleteChildren() (this=this@entry=0x991c240) at kernel/qobject.cpp:1997 4 QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1025 5 QFileSystemWatcher::~QFileSystemWatcher() (this=0x9641b60, __in_chrg=<optimized out>) at io/qfilesystemwatcher.cpp:277 6 QObjectPrivate::deleteChildren() (this=this@entry=0x2a30130) at kernel/qobject.cpp:1997 7 QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1025 8 QThread::~QThread() (this=0x2a079b8, __in_chrg=<optimized out>) at thread/qmutex.h:217 9 () at /lib64/libQt5Widgets.so.5 10 QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (pointer=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:52 11 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (this=0x98aa4d8, __in_chrg=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107 12 QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:884 13 QFileSystemModel::~QFileSystemModel() () at /lib64/libQt5Widgets.so.5 14 QObjectPrivate::deleteChildren() (this=0x97bab00) at kernel/qobject.cpp:1997 15 QWidget::~QWidget() () at /lib64/libQt5Widgets.so.5 16 QFileDialog::~QFileDialog() () at /lib64/libQt5Widgets.so.5 17 std::default_delete<QFileDialog>::operator()(QFileDialog*) const (this=0x9770f90, __ptr=0x926e970) at /usr/include/c++/8/bits/unique_ptr.h:81 18 std::unique_ptr<QFileDialog, std::default_delete<QFileDialog> >::~unique_ptr() (this=0x9770f90, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:274 19 Qt5FilePicker::~Qt5FilePicker() (this=0x9770ed0, __in_chrg=<optimized out>) at vcl/qt5/Qt5FilePicker.cxx:155 Change-Id: Iddfa3d44de59e1760e20a389566d9e6815ab26f7 Reviewed-on: https://gerrit.libreoffice.org/68355 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: Qt5/KDE5 RunInMainThreadMichael Stahl
The problem with the current approach of transferring calls to the main thread with Q_EMIT signals is that if the code that should run in the main thread needs SolarMutex, then the non-main-thread must use SolarMutexReleaser - but then the main thread will run not only the call that is needed right now, but will potentially process all pending events, and the other thread hasn't prepared for that. We need the inter-thread feature of Qt::BlockingQueuedConnection and the non-queued feature of Qt::DirectConnection, but this combination doesn't appear to exist. So the SolarMutexReleaser needs to go - but then the main thread does need SolarMutex for some things, and hence we need to trick it into believing it has SolarMutex with the m_bNoYieldLock hack. Then it becomes apparent that the main thread may be blocked on either Qt events, which is fine, or on the SalYieldMutex's m_aMutex, which will never be released now. So the main thread must never block on m_aMutex; the alternative is to use the same approach as the osx code (and, in a somewhat different form, the svp code), and add some condition variables on which the main thread can block if it fails to acquire the m_aMutex immediately. It's even possible to do this in a somewhat generic way with lambdas. This does appear to work, but it makes the Q_EMIT approach entirely untenable, because now the main thread will be blocked on the condition variable and the non-main-thread will be blocked until the Qt event is processed. Change-Id: I6480a6b909d5ec8814b2ff10dbefb0f3686a83c7 Reviewed-on: https://gerrit.libreoffice.org/68232 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#120783: take suggested/preferred DnD ops into accountKatarina Behrens
use those for drag operation start in Qt5Widget and eventually to construct DropTargetDragEnterEvent Change-Id: I3a92cbe722dadc64f8a210f7fd4016c8eb17216b Reviewed-on: https://gerrit.libreoffice.org/68675 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Add support for <image> draw definition to draw a SVG imageTomaž Vajngerl
Attribute "source" is used to get the relative path to the image. Path is relative to the definition file. Change-Id: I6ca0c113385e26ad74b928e1f56635b4b0cef995 Reviewed-on: https://gerrit.libreoffice.org/68712 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>