Commit Graph

220 Commits

Author SHA1 Message Date
Paul Cornett
61d59dfc85 non-pch build fix 2019-03-06 08:49:05 -08:00
Vadim Zeitlin
d841f7b34e Merge branch 'wxQt-memory-leaks' of https://github.com/catalinr/wxWidgets
Fix many memory leaks in wxQt port.

See https://github.com/wxWidgets/wxWidgets/pull/1243
2019-03-05 23:36:41 +01:00
Cătălin Răceanu
934698d8ac Change Qt smart pointers with wx ones to fix compilation 2019-02-27 22:06:47 +02:00
Cătălin Răceanu
1578240b6e Change a couple of data types and simplify code a bit 2019-02-27 17:42:01 +02:00
Cătălin Răceanu
113822d024 Change member variable type 2019-02-27 16:58:35 +02:00
Cătălin Răceanu
315a9460c0 Remove memory leaks by using smart pointers or explicit delete 2019-02-27 01:12:03 +02:00
Cătălin Răceanu
595a9945b5 Do not leak the list of panes 2019-02-26 23:13:12 +02:00
Paul Cornett
5e3c39043d Fix wxQT monolithic build on Linux
- Remove duplicate wxConsoleAppTraits::CreateEventLoop()
  It's already defined for Unix as well as Windows

- Remove wxEventLoop AddSourceForFD() "override"
  the base version is static and therefore clearly not meant to be overridden
2019-02-25 00:35:27 -08:00
Cătălin Răceanu
cb74819562 Don't leak QApplication and command line arguments 2019-02-24 23:45:46 +02:00
Cătălin Răceanu
0e3784c46e Implement support for value range in wxQt wxSpinButton
Closes https://github.com/wxWidgets/wxWidgets/pull/1237
2019-02-22 19:49:06 +01:00
Cătălin Răceanu
be9c18cbd6 Reuse Qt implementation of normal button for toggle buttons 2019-02-13 01:23:20 +02:00
Cătălin Răceanu
7be9c8c670 Remove functions that are identical with the ones in base classes 2019-02-13 01:15:19 +02:00
Cătălin Răceanu
50edbf24cc Change the base class of wxBitmapToggleButton 2019-02-13 01:09:16 +02:00
Cătălin Răceanu
39c9992ec9 Remove declaration already present in common code 2019-02-13 00:58:54 +02:00
Cătălin Răceanu
193cf3fee9 Change the order of class declarations only 2019-02-13 00:55:00 +02:00
Catalin Raceanu
fb00507fb5 Implement image support for button states in wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1224
2019-02-11 19:34:26 +01:00
Graham Dawes
6482664955 Fix build errors when building with gcc 2019-02-08 14:43:04 +00:00
Jay Nabonne
8844e16b03 Fix new header. 2019-02-08 14:03:32 +00:00
Jay Nabonne
b7ff45799c Clean up file. 2019-02-08 10:57:08 +00:00
Graham Dawes
57348b4a59 Add EditControl support for wxTreeCtrl under wxQT 2019-02-06 09:20:13 +00:00
Graham Dawes
cfe36f7ae7 Move wxQtTreeItemEditorFactory to its own header 2019-02-06 08:57:29 +00:00
Graham Dawes
2a91c00c10 Add missing d'tor 2019-02-05 16:13:56 +00:00
Graham Dawes
8efe01bd8e Implement basic styles for wxTreeCtrl under wxQT 2019-02-05 13:46:32 +00:00
Graham Dawes
308ef18a6d Start "native" implementation of wxTreeCtrl for wxQT 2019-02-05 13:23:12 +00:00
Graham Dawes
eb00d7623a Rename internal tree widget to something more appropriate for
a wxListCtrl.
2019-02-05 08:06:26 +00:00
Vadim Zeitlin
153b5e85fb Merge branch 'qt_combobox_crash' of https://github.com/GeoTeric/wxWidgets
Fix crashes when using wxCB_READONLY in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1221
2019-02-05 03:04:21 +01:00
Vadim Zeitlin
ddc550105e Merge branch 'qt-radio-groups'
Fix radio button grouping in Qt.

See https://github.com/wxWidgets/wxWidgets/pull/1212
2019-02-05 03:03:10 +01:00
Graham Dawes
a60c2470b5 Dedupe wxCB_READONLY check 2019-02-04 09:26:10 +00:00
Vadim Zeitlin
9a7a89b7b2 Merge branch 'qt-convert-simplify'
Simplify Qt conversion functions and stop mapping wxPoint(-1,-1) and
wxSize(-1,-1) to QPoint(0,0) and QSize(0,0), respectively.

See https://github.com/wxWidgets/wxWidgets/pull/1206
2019-02-02 17:12:50 +01:00
chris2oph
f8c345ca95 Fix painting logic in wxQt wxClientDC implementation
The original drawing mechanism was generating lots of QWarning messages
when running samples (e.g. htlbox, caret, etc.) and in some cases was
not actually completely drawing every element of the sample. The issue
was that the QPicture was being shared incorrectly between wxWindow and
wxClientDC and attempts to start painting, update, etc. were generating
console warnings.

Closes https://github.com/wxWidgets/wxWidgets/pull/1152
2019-02-02 16:23:49 +01:00
Vadim Zeitlin
6370662cc8 Merge branch 'qt-dnd'
Initial drag-and-drop implementation for wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1205
2019-02-02 15:54:21 +01:00
Graham Dawes
f2d20384a0 Implement wxListCtrl::GetEditControl() for wxQt
To get access to the control used for editing items, we need to create
it ourselves, which involves defining our own factory for doing this,
but seems to be the only way of achieving our goal.

Closes https://github.com/wxWidgets/wxWidgets/pull/1204
2019-02-02 15:35:26 +01:00
Vadim Zeitlin
10b35c22f5 Remove unnecessary "protected:" from wx/qt/radiobut.h
No real changes, just remove an empty protected section.
2019-02-02 15:06:11 +01:00
Vadim Zeitlin
481b29e6ce Stop mapping QSize(0,0) to wxSize(-1,-1) as well
Do this for consistency with a similar recent change to wxPoint.
2019-02-02 14:24:16 +01:00
Vadim Zeitlin
1a9f0f8b8d Make trivial Qt <-> wx conversion functions inline
No real changes, just make often used and trivial functions inline as
this like an obviously better thing to do.
2019-02-02 14:24:16 +01:00
Vadim Zeitlin
5154cc711a Include QRect, QSize and QString from wx/qt/private/converter.h
Similarly to the previous commit, it doesn't seem to be worth it to
avoid including these simple and common headers from there and it
simplifies code and will allow making the converter functions inline.
2019-01-30 18:12:12 +01:00
Vadim Zeitlin
b0d88a306d Include wx/qt/private/converter.h from src/qt/converter.cpp
Follow standard practice and include the header corresponding to the
source file from it explicitly.

Also include wx/gdicmn.h from the header itself, this is a pretty common
header and there is no real advantage in avoiding it there and including
it allows to avoid a bunch of forward declarations.
2019-01-30 18:07:33 +01:00
Vadim Zeitlin
4d16029f8b Merge branch 'notebook-add-page-events'
Harmonize events sent by wxNotebook::AddPage(): they are now sent only
when adding any page except the first one if it is selected in all
ports.

See https://github.com/wxWidgets/wxWidgets/pull/1192
2019-01-30 17:38:51 +01:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Matthew Griffin
ae94f4da9c Ensure that top level window is active when it's shown in wxQt
Under some (not totally clear) circumstances, a TLW can remain inactive
after being shown, which is undesirable, as it prevents setting focus to
its children from working.

Work around this by calling activateWindow() explicitly if necessary.

Closes https://github.com/wxWidgets/wxWidgets/pull/1179
2019-01-30 17:27:15 +01:00
Jay Nabonne
653979936b Clean up the code a bit to follow the guidelines, including handling of default in switches and line length. 2019-01-30 15:59:37 +00:00
Jay Nabonne
df38836862 Fixed some spacing. 2019-01-30 14:36:06 +00:00
Jay Nabonne
6fa65900f9 Implement cursor overriding for DnD on wxQt.
This uses the cursor variant (as opposed to the icon one) since these actually are cursors, the base class looks like cursors are meant to be used, and the icon thing looks like a hack.
2019-01-30 14:22:01 +00:00
Graham Dawes
c3b8b81da5 Remove unused includes from qt/window.h 2019-01-30 09:27:35 +00:00
Jay Nabonne
6ba6d9967a Change Qt wxDropTarget to remember widget and disconnect self when necessary. Clean up naming a bit. 2019-01-29 17:11:09 +00:00
Jay Nabonne
8c63c40953 Clean up wxDropTarget and wxWindow a bit more by moving DnD stuff fully into drop target (besides connecting and disconnecting).
Window doesn't have to know more than how to hook itself up.
Impl now performs function of event filter/adapter.
2019-01-29 16:55:31 +00:00
Jay Nabonne
2bceaaa572 Clean up wxDropTarget (first stage) by moving Qt specific stuff (e.g. QMimeData) into an Impl. 2019-01-29 16:29:58 +00:00
Jay Nabonne
323cbdabdb Implement initial try of wxDropTarget.
The drop target needs to use an event filter to capture drag-and-drop events from the window.
2019-01-29 16:13:41 +00:00
Graham Dawes
3cb395a5a5 Implement wxNotebook::DeleteAllPages() for wxQt
See https://github.com/wxWidgets/wxWidgets/pull/1191
2019-01-28 19:07:28 +01:00
Vadim Zeitlin
665b5a76a8 Remove unnecessary wxNotebook::DoSetSelection() from wxQt
Having this method didn't really help, it's simpler and more
straightforward to implement ChangeSelection() as a signal-blocking
wrapper around SetSelection() instead.

No real changes in behaviour, this is a pure refactoring.
2019-01-28 17:51:27 +01:00