Commit Graph

63288 Commits

Author SHA1 Message Date
Sean D'Epagnier
5261d3eb05 correct null reference if set flags is called in Init 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
7e7530f010 return correct dialog return code for exec 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
52a7a1c5e6 windows should not be destroyed just because the close event succeeds 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
27df7100b4 correct wxqt listctrl for invalid index 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
988bc8b306 correct text extent to not require active painter 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
cc01fbc3c0 defer dc screen grab until blit 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
694decea6e apply mask to result after paint operations so that qt doesn't clobber the mask
also fixes small memory leak
2017-11-06 02:05:40 +01:00
Sean D'Epagnier
65af28271e improve selection (base class handles this better already) 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
1cb7120ac9 support masked or partially transparent windows in wxqt 2017-11-06 02:05:40 +01:00
Sean D'Epagnier
35bc8f449b Improve build and widget storage
There are no longer any qt headers included in wx/qt headers.
Applications do not need to link with qt librarys anymore, only wxqt libraries.
wxWindow and derived widgets only contain one pointer to their qtwidget, no longer
  carrying both base and derived pointers in parallel as was before.
2017-11-06 02:05:40 +01:00
Sean D'Epagnier
88e134ef81 improve cursor and color implementation in wxqt 2017-11-06 02:04:23 +01:00
Sean D'Epagnier
9f39eeb5e9 wxqt: improve wxbitmap and wxmask implementation 2017-11-06 02:04:23 +01:00
Sean D'Epagnier
e7ca3220f3 improve wxqt behavior 2017-11-06 02:04:23 +01:00
Sean D'Epagnier
8be71bd900 fix failed assertions in wxqt from newer wx library code 2017-11-06 02:04:23 +01:00
Sean D'Epagnier
4e1ddab3ad add stubs for new opengl formats to wxqt, this fixes opengl for wxqt 2017-11-06 02:04:23 +01:00
Sean D'Epagnier
44c91fedb8 fix build without graphics context 2017-11-06 02:04:23 +01:00
hwiesmann
f9429b7db4 Make wxAuiManager::SavePaneInfo() parameter const
The pane is not modified by saving its details.
2017-11-05 23:45:21 +01:00
Vadim Zeitlin
b4e55a7192 Merge branch 'test-fixes'
Miscellaneous test fixes and disable the UI tests by default under
non-MSW platforms.
2017-11-05 23:44:01 +01:00
Paul Cornett
74282d9aed Fix DrawPoint() test
The result now matches non-GC wxDC, after 5ba7a1d1
2017-11-05 09:35:43 -08:00
Vadim Zeitlin
99378ed0d7 Disable tests using wxUIActionSimulator under non-MSW platforms
wxUIActionSimulator is just too unreliable to be used there, so while
fixing it should really be a priority, for now at least prevent these
spurious failures from masking any other ones, which indicate real
problems that need to be fixed.

Notice that these tests can still be enabled by setting the environment
variable WX_UI_TESTS to 1 (or disabled by setting it to 0 under MSW).
2017-11-05 17:51:55 +01:00
Vadim Zeitlin
0858cd52a7 Don't unnecessarily use heap-allocated objects in a test
Just use local stack variables instead.
2017-11-05 17:30:46 +01:00
Vadim Zeitlin
10b80a16f0 Factor out TempFile class and reuse it in other tests
Ensure we don't leave "mytext.dat" and "test.txt" lying around in any
directory the tests are run from by ensuring that these files are
destroyed by the test code using them.
2017-11-05 17:28:24 +01:00
Vadim Zeitlin
0425b8b7f0 Properly terminate UTF-16 strings in cMB2WC() unit test
Such strings must have 2 NUL bytes at the end, just the one added
implicitly to all C strings isn't enough.
2017-11-05 17:18:58 +01:00
Vadim Zeitlin
aaea62a322 Avoid launching interactive programs in unattended tests
This is typically going to fail anyhow, so don't even try to avoid
useless error messages.
2017-11-05 17:16:39 +01:00
Hartwig
d36d251e8d Improve documentation for loading and saving AUI layout
Give more details about LoadPerspective() and Save/LoadPaneInfo().

See https://github.com/wxWidgets/wxWidgets/pull/584
2017-11-05 16:51:53 +01:00
Tim S
1c2e58cd85 Remove cp commands copying removed files from help sample
Just remove the commands copying files that were removed in
961a1c2b39 themselves too.

See #17962.
2017-11-05 16:47:25 +01:00
Tim S
7f4035dc5b Update instructions for building under MSys2
Added "--needed --noconfirm" to pacman for faster package updating.
2017-11-05 16:47:17 +01:00
Lauri Nurmi
f529dfaaef Fix wxPenInfo ctor compilation with gcc 4.4.7 on CentOS 6
Use template argument when calling the base template class ctor.
2017-11-05 16:42:20 +01:00
Vadim Zeitlin
56323b5aba Merge branch 'log-encoding'
See https://github.com/wxWidgets/wxWidgets/pull/552

Closes #17385.
2017-11-04 18:20:24 +01:00
Vadim Zeitlin
a7dddd9f3b Refactor wxLog and wxMessageOutput classes to avoid duplication
Add wxMessageOutputWithConv mix-in class to avoid duplicating the same
code in wxLogStream and wxMessageOutputStderr.

Also derive wxLogStderr from wxMessageOutputStderr to reuse its code
without having to create a temporary object of this type (which will be
more expensive now that doing it involves creating a heap-allocated
conversion object copy).
2017-11-04 16:19:06 +01:00
Vadim Zeitlin
7872e8f7ef Allow using web extension from tests and sample
Check for web extension in ".." and "../.." to find it when running the
webview test and sample, respectively, even if "make install" hadn't
been done yet.

Also give a warning about the missing extension if we can't find it
anywhere.
2017-11-04 16:07:53 +01:00
Vadim Zeitlin
7e0b6d4d81 Merge branch 'webview-js-retval'
Integrate GSoC 2017 work by Jose Lorenzo on allowing returning values
from JavaScript code via wxWebView::RunScript().
2017-11-04 16:07:51 +01:00
Lauri Nurmi
6b73bd9136 Allow specifying character set for wxLogStderr and wxLogStream.
Until now, a mixture of non-UTF-8 and UTF-8 could be written in some circumstances.
2017-11-04 15:47:18 +02:00
Vadim Zeitlin
1417776d33 Make deleting toolbar from its own event handler work again
While it is not guaranteed in general that destroying a window from an
event handler for an event originating from this window itself works, it
did use to work in the case of wxToolBar and its event handlers. However
this stopped working since faffaaae29 as
it added a test using the now deleted object member fields after the
call to the event handler.

To fix this regression without reintroducing the bug fixed by that
commit (see #16762), add an ugly way to check if the toolbar is still
alive after a call to its event handler and do it explicitly after
OnLeftClick() returns.

Closes #17732.
2017-11-04 14:28:38 +01:00
Vadim Zeitlin
266152b459 Merge branch 'mbconv-len-fix'
Return buffers of correct length from wxMBConv::cWC2MB() and cMB2WC().
2017-11-04 14:20:15 +01:00
Vadim Zeitlin
c47acbeb52 Fix wxMBConv::cWC2MB() and cMB2WC() returned buffer length
This commit refactors the overloads of cMB2WC() and cWC2MB() methods
taking raw pointers and buffers to reuse the same code and fixes the
wrong length of the buffer returned by cWC2MB(wchar_t*) overload for
conversions using multiple bytes to represent the NUL terminator
character (it previously was wrong for UTF-16 and UTF-32 conversions due
to wrongly subtracting 1 from the length when creating it instead of
correctly subtracting GetMBNulLen()) and the wrong length of the buffer
returned from cMB2WC(char*) overload where no adjustment for the
trailing NUL was done at all.

Also return simple default-constructed buffers from these methods in
case of failure instead of using wxScopedCharBuffer::CreateNonOwned()
which is less obvious and less efficient (even if the latter probably
doesn't matter here because it's only done in case of an error).

Finally, add tests checking that using WC2MB() or either of cWC2MB()
overloads returns the buffers of the same length and with the same
contents.
2017-11-03 23:26:39 +01:00
Vadim Zeitlin
b8881c1b8e Test UTF-8 build on Travis CI
Instead of adding a separate build, just reuse the existing monolithic
build to also use UTF-8: this is unlikely to miss any problems with the
monolithic build that would be found without using these options, but
also gives us a chance to find the problems in UTF-8 build, both at
compile-time and in the test suite.
2017-11-03 23:11:33 +01:00
Vadim Zeitlin
9c1964ee1d Fix a unit test in UTF-8 build using UTF-8 strings only
Avoid the optimized mb_str() available in this build returning directly
a "char*" as it doesn't preserve the length of the string if it contains
NULs. Use mb_str(wxMBConv) overload instead which always returns the
buffer of the correct length.

Arguably, this is a problem of wxString API and maybe this optimized
mb_str() overload shouldn't be provided at all. OTOH the main reason for
wxUSE_UTF8_LOCALE_ONLY existence is optimization, so it seems a pity to
deliberately make the code less efficient when using it.
2017-11-03 23:11:32 +01:00
Vadim Zeitlin
6d3530a653 Merge branch 'cygwin-python'
Fix Python problem in Cygwin build on AppVeyor correctly.
2017-11-03 19:46:36 +01:00
Paul Cornett
d57d9ffaf7 Avoid some GTK+ run-time errors when using wx{File,Dir}PickerCtrl
The wxGTK implementation uses wx{File,Dir}Button, which derives from
wxButton, but is not a GtkButton, so many operations which try to modify
it, such as changing it's style, are likely to result in errors.
See #17984
2017-11-03 11:45:50 -07:00
Vadim Zeitlin
84b2ba40ee Fix wrong wxStringOutputStream optimization for UTF-8 build
We can only use utf8_length() if the conversion used with this object
uses UTF-8 too, otherwise we still need to do the conversion to find out
how many bytes does the string content take in the given encoding.

See #17985.
2017-11-03 18:48:38 +01:00
Vadim Zeitlin
8bf239f8e4 Make wxMBConv dtor inline
The Darwin linking problem mentioned in the comment doesn't exist in any
of the still supported macOS versions, so it doesn't make sense to
continue working around it.
2017-11-03 18:00:04 +01:00
Vadim Zeitlin
2e9e38aba1 Revert "Work around using Python in Cygwin AppVeyor build"
This reverts commit 257974e321 as it
shouldn't be needed any more after the last commit.
2017-11-03 17:34:51 +01:00
Vadim Zeitlin
69d3c2bf50 Use -g (--upgrade-also) switch with Cygwin setup on AppVeyor
This is necessary to properly upgrade the package dependencies when
installing the new versions of the packages themselves and fixes the
problem with the new Python 2.7.14 failing to run since its package was
updated from 2.7.13.
2017-11-03 17:33:13 +01:00
Vadim Zeitlin
724de3e1d1 Merge branch 'strstream-pos-fix'
See https://github.com/wxWidgets/wxWidgets/pull/580

Closes #17985.
2017-11-03 17:24:35 +01:00
Vadim Zeitlin
70c057ed8a Revert "Test using previous build platform for AppVeyor"
This reverts commit b05d864f5e as it
didn't help with Python-related build failures, finally.
2017-11-03 16:58:33 +01:00
Vadim Zeitlin
257974e321 Work around using Python in Cygwin AppVeyor build
This doesn't work any longer since Cygwin Python 2.7.14 update, see
https://cygwin.com/ml/cygwin/2017-11/msg00053.html

Avoid using it by preventing include/wx/stc/stc.h file from being
updated, this shouldn't be necessary anyhow as the version in git should
be already up-to-date.
2017-11-03 15:46:33 +01:00
Vadim Zeitlin
e3589af56a Fix wxStringOutputStream position when using external string
Initialize m_pos correctly when using an existing, and hence possibly
not empty, string (and not the internal one which is always empty
initially). The old code was totally wrong as it divided the string
length by the size of wxChar instead of multiplying by it, but doing
this could have been wrong too with UTF-16 and surrogates, so use the
conversion object to compute the real length of the string
representation in the corresponding encoding.

Add a simple unit test checking that this works as intended.

Closes #17985.
2017-11-03 15:25:36 +01:00
Vadim Zeitlin
8e7fef5f08 Make wxStringOutputStream ctor explicit
Avoid accidentally creating wxStringOutputStream from a wxString
pointer, this seems unlikely, but why take the risk of it happening at
all.
2017-11-03 00:36:48 +01:00
Vadim Zeitlin
e09d87f54b Move wxStringOutputStream ctor to the source file
There is no real need for this not quite trivial function to be inline.

No real changes.
2017-11-02 23:36:05 +01:00