Commit Graph

63519 Commits

Author SHA1 Message Date
Vadim Zeitlin
af16d8ba5c Explicitly set "update = checkout" option for submodules
It seems that older Git versions don't update submodules when issuing
just "git submodule update" if this option is not set.

We might actually prefer to use "update = rebase" but for now use the
smallest change that will (hopefully) allow people using older Git
versions to get the submodule updates.
2017-11-13 15:24:37 +01:00
Vadim Zeitlin
818a710af6 Update bundled libtiff to not use wxjpeg_boolean any more
This is not needed after e35f01384f.
2017-11-12 23:23:48 +01:00
Artur Wieczorek
4df04a88c5 Set wxPG cell background colour as wxPGComboBox background colour
Default wxGenericComboCtrl background colour is obtained under wxGTK
with wxComboBox::GetClassDefaultAttributes(). For wxGTK 3 returned colour
is fully transparent (00000000) which can cause problems with
proper drawing of controls deriving from wxGenericComboCtrl, like
wxPGComboBox which in turn is used by wxEnumProperty, wxCursorProperty,
etc.
wxPGComboBox should have background with the same colour as the cell
so we can explicitly set background colour to avoid using default one.

Closes #17986.
2017-11-12 22:09:09 +01:00
Paul Cornett
7592595252 fix SetPosition() parameter in documentation 2017-11-12 09:36:33 -08:00
Paul Cornett
142004884f Build fixes for wxUSE_UNICODE==0 2017-11-12 09:35:12 -08:00
Paul Cornett
cdb9436975 Use wxFALLTHROUGH 2017-11-12 09:34:22 -08:00
Paul Cornett
65cc4c1624 Avoid ifdef-ed override specification
Instead, add the base class functions so the derived class always
overrides. If/when wxX11 and wxMotif are removed there won't be an
ifdef that no one ever notices isn't needed anymore.
2017-11-12 09:33:37 -08:00
Vadim Zeitlin
4e226d6784 Merge branch 'extra-warn-fixes'
Fix a few harmless warnings given with -Wextra.
2017-11-12 17:48:16 +01:00
Vadim Zeitlin
4e593b9f06 Document switch to submodules for 3rd party libraries
Update the build instructions and the change log.
2017-11-12 17:47:09 +01:00
Vadim Zeitlin
e35f01384f Merge branch 'jpeg-submodule'
Switch to using submodule and update the library version.
2017-11-12 17:43:22 +01:00
Vadim Zeitlin
fc9d41fad3 Avoid -Wmissing-field-initializers for Dl_info struct
Rely on the default initialization, this is arguably slightly less
clear, but allows to avoid the warning (which is disabled by default,
but still).

Closes #17997.
2017-11-12 17:07:35 +01:00
Scott Furry
b39d29f433 Fix harmless -Wmissing-field-initializers in wxGTK
Closes #17996.
2017-11-12 17:05:55 +01:00
Scott Furry
3653b753d3 Fix clang -Winconsistent-missing-override in wxGLApp
Use "override" for wxGLApp::GetXVisualInfo(), but only for wxGTK2 where
it really overrides it, unlike in wxX11.

Closes #17995.
2017-11-12 17:02:43 +01:00
Vadim Zeitlin
a03441f959 Suppress harmless -Wmissing-fields-initialize in wxSecretStore
This warning is difficult to avoid as we don't want to initialize the
unused/reserved fields of SecretSchema struct, yet the compiler warns
about it (when using -Wextra).
2017-11-12 16:57:40 +01:00
Vadim Zeitlin
cc8657e436 Upgrade libjpeg to the latest version 9b
There don't seem to be any really important changes affecting our use of
the library, but it seems better to use the 2016 version instead of the
1998 one and it also allows to get rid of many hacks that were needed
before as the things they worked around are now taken care of by the
library itself.
2017-11-12 16:32:35 +01:00
Vadim Zeitlin
0fe8d68c11 Replace jpeg subdirectory with a Git submodule
Use libjpeg-turbo repository as upstream, even if we don't use
libjpeg-turno library itself (yet?) because it also has all the historic
libjpeg versions in its repository, including 6b (dating from 1998!)
that our sources were based on.
2017-11-12 00:54:11 +01:00
Vadim Zeitlin
edf0db1eb3 Update libtiff to the latest 4.0.8 version 2017-11-11 23:39:00 +01:00
Vadim Zeitlin
03c81535ab Replace tiff subdirectory with a Git submodule
Try to preserve most of the manual changes done to libtiff sources in
wxWidgets, dropping just some VC6-specific workarounds which are not
needed any more.
2017-11-11 23:39:00 +01:00
Vadim Zeitlin
2cee986e03 Merge branch 'expat-submodule'
Switch to using submodule and update the library version.
2017-11-11 20:51:24 +01:00
Vadim Zeitlin
1a1cfc2d02 Upgrade Expat submodule to the latest 2.2.5 version
No special changes, just propagate submodules changes to the main
repository.
2017-11-11 20:50:51 +01:00
Vadim Zeitlin
b9af392704 Remove obsolete COMPILED_FROM_DSP from Expat project files
This symbol is not used any longer since 2.2.0, see the corresponding
entry in Expat change log file.
2017-11-11 20:50:51 +01:00
Vadim Zeitlin
824134d427 Replace Expat sources directory with a Git submodule
This will make it simpler to track upstream in the future.
2017-11-11 20:50:50 +01:00
Vadim Zeitlin
e1c54ff032 Update 3rd party libraries updating instructions
Explain how to do it now when Git submodules are used for them instead
of speaking about svn vendor branches.
2017-11-11 15:35:35 +01:00
Vadim Zeitlin
ddb28af028 Merge branch 'png-submodule'
Switch to using submodule and update the library version.
2017-11-11 15:32:41 +01:00
Vadim Zeitlin
c443b4c264 Don't use multi-character constants for portability reasons
Instead of using numeric constants for MinGW and character constants
otherwise, just always use the former as this code can also be compiled
with non-MinGW gcc when building under Cygwin and this results in the
same warnings as for MinGW.

Additionally, it's not guaranteed that other MSW compilers actually
support multi-character constants at all, even if they don't warn about
them, so just avoid them completely.
2017-11-11 15:30:22 +01:00
Vadim Zeitlin
617250bc11 Upgrade libpng to 1.6.34
Upgrade src/png submodule to the latest library version and slightly
update its upgrade instructions.
2017-11-11 14:13:30 +01:00
Vadim Zeitlin
a8e7d0ee12 Replace png sources directory with a Git submodule
This will make it simpler to track libpng upstream in the future.
2017-11-11 13:42:14 +01:00
Vadim Zeitlin
c98fa0ca98 Add wxWindowBase::SetDoubleBuffered() stub
This method was already provided by wxGTK and wxMSW, but not wxOSX nor
any other ports.

Provide a stub for it in wxWindowBase to allow user code to call it on
all platforms, there is no harm in that even if it doesn't (and can't)
do anything under macOS.
2017-11-11 11:47:56 +01:00
Paul Cornett
7a7f715160 Fix "chaining up" to parent class in key-press-event handler
Getting the parent class was done incorrectly in 819638a7, causing
the chain-up to go to the current class rather than the parent.
2017-11-10 22:54:58 -08:00
Vadim Zeitlin
147eb12f91 Replace zlib subdirectory with a Git submodule
This should make it much simpler to update to newer library versions in
the future.
2017-11-10 18:16:07 +01:00
Vadim Zeitlin
6022a51881 Merge branch 'expat-entropy-fix' 2017-11-10 18:15:36 +01:00
Vadim Zeitlin
e35aff4684 Checkout submodules in Appveyor builds
Unlike Travis CI, Appveyor doesn't do this automatically, but we will
need them soon (the currently existing Catch submodule is not used by
Appveyor builds but, arguably, should be too).
2017-11-10 17:44:03 +01:00
Vadim Zeitlin
fc8b7e4e61 Build bundled 3rd party libraries on Travis
Configure Travis CI to run at least one build using the bundled versions
of third party libraries to make sure this is tested too.
2017-11-10 17:43:01 +01:00
Vadim Zeitlin
99be9a25f2 Compile expat even without entropy source when using configure
There is no other choice but to continue without a high quality entropy
source if it's just not available on the current system as determined by
configure.

This problem was fixed in Expat fd9581a34e5665958939e3db408893fd4fac7398
which is not yet included in our version, and the (hopefully soon to be
implemented) real solution is to just upgrade Expat version, but for now
at least allow building without any extra hacks such as putting
XML_POOR_ENTROPY in CPPFLAGS.
2017-11-10 17:39:38 +01:00
Vadim Zeitlin
66c644fe20 Merge branch 'text-stream-nuls'
Fixes for wxTextInputStream and wxMBConvUTF{7,16} classes bug fixes.
2017-11-10 03:14:01 +01:00
Kevin Ollivier
0ad45d3e0e Fix generic wxTimePickerCtrl to accept max values from keyboard
Allow entering times such as 23:59:59 which were previously mistakenly
flagged as invalid due to off by one error in the comparison in the
validation function.
2017-11-10 00:02:49 +01:00
Vadim Zeitlin
4502e7563b Fix wxTextInputStream for input starting with BOM-like bytes
Contrary to what a comment in wxTextInputStream::GetChar() said, it is
actually possible to get more than one wide character from a call to
wxMBConv::ToWChar(len+1) even if a previous call to ToWChar(len) failed
to decode anything at all. This happens with wxConvAuto because it keeps
returning an error while it doesn't have enough data to determine if the
input contains a BOM or not, but then returns all the characters
examined so far at once if it turns out that there was no BOM, after
all.

The simplest case in which this created problems was just input starting
with a NUL byte as it as this could be a start of UTF-32BE BOM.

The fix consists in keeping all the bytes read but not yet decoded in
the m_lastBytes buffer and retrying to decode them during the next
GetChar() call. This implies keeping track of how much valid data is
there in m_lastBytes exactly, as we can't discard the already decoded
data immediately, but need to keep it in the buffer too, in order to
allow implementing UngetLast(). Incidentally, UngetLast() was totally
broken for UTF-16/32 input (containing NUL bytes in the middle of the
characters) before and this change fixes this as a side effect.

Also add test cases for previously failing inputs.
2017-11-09 23:49:59 +01:00
Vadim Zeitlin
46ea3cb8c0 Refactor: merge decode_utf16() into wxDecodeSurrogate()
No real changes, but just get rid of two functions doing the same thing
but using (semantically) different API, this was just too confusing.

Change all the code to use wxDecodeSurrogate() that encapsulates
decoding the surrogate and advancing the input pointer as needed and so
is less error-prone.

More generally, change the code to use end pointers instead of
decrementing the length to check for the end condition: this is more
clear, simpler and probably even more efficient.
2017-11-09 23:49:53 +01:00
Vadim Zeitlin
d82e3d4429 Never read uninitialized memory when decoding UTF-16 again
Pass length value to decode_utf16() and end pointer to
wxDecodeSurrogate() to ensure that we never read beyond the end of the
buffer when decoding UTF-16 when the last (complete) 16 bit value in the
buffer is the first half of a surrogate.

This had been previously partially addressed by ad hoc changes, e.g.
f72aa7b1c9 did it for wxMBConvUTF16swap,
but the problem still remained for wxMBConvUTF16straight. Ensure that
this bug is fixed everywhere now but making it impossible to even try
decoding a surrogate without providing the buffer length.
2017-11-09 23:48:20 +01:00
Vadim Zeitlin
2ee199acac Change decode_utf16() to take wxChar16 instead of wxUint16
Under Unix systems, this is the same thing, but under MSW, where
sizeof(wchar_t) == 2, this allows to pass wchar_t pointers to this
function without casts.

It also makes it consistent with wxDecodeSurrogate() and allows to get
rid of another ugly cast there.

No real changes.
2017-11-09 23:47:22 +01:00
Vadim Zeitlin
9d5ff447e1 Add subsections to MBConvTestCase::NonBMPCharTests()
This allows to immediately see which of the tests failed just looking at
the logs instead of having to check the failure line number manually.

No real changes.
2017-11-09 23:38:03 +01:00
Vadim Zeitlin
666ff421bb Fix an out of bounds read in UTF-7 decoding code
Calling wxMBConvUTF7::ToWChar(..., "+", 1) resulted in reading
uninitialized memory as the decoding code didn't check that there were
any bytes left when switching to the "shifted" mode.

Fix this by explicitly checking for this and returning an error if
nothing is left.
2017-11-09 23:38:00 +01:00
PB
022a725bf9 Fix few minor issues in wxAutomationObject documentation
Remove redundant consts, document GetDispatchPtr() return type.
2017-11-09 22:18:57 +01:00
Stefan Csomor
fac481f6ea Removing whitespace which lead to incorrect processing by update-setup-h on macOS 2017-11-09 11:43:05 +01:00
Stefan Csomor
895a86886d Modelling setup.h modification on osx along msw, having a separate file
Note that for update-setup-h to work properly on osx, gnu-sed is needed
2017-11-09 11:35:36 +01:00
Vadim Zeitlin
f365b0712b Get rid of wxTextInputStream code dealing with wxEOT
Having NextChar() returning wxEOT only for GetChar() to turn it back to
NUL didn't make any sense, just return NUL directly and get rid of
GetChar/NextChar() distinction.

No real changes, just simplify the code.
2017-11-08 23:27:13 +01:00
Vadim Zeitlin
46fe849db6 Restore access to wxLogStderr::m_fp from derived classes
This was allowed before, but m_fp became private after the refactoring
of a7dddd9f3b.

Make it protected again now to avoid breaking existing code that
accesses it.
2017-11-07 22:40:32 +01:00
VZ
d3db5b30f6
Fix or disable currently failing wxGTK GUI tests
Try to ensure that the GUI test suite passes so that buildbot has a
chance to warn us if/when anything breaks.
2017-11-07 20:56:09 +01:00
Vadim Zeitlin
b130595975 Remove accidental global variable from the font sample
This variable was never used and appears to have been created
accidentally, so just remove it and avoid variable shadowing warnings
from MSVS 2015 when building the sample.
2017-11-07 18:28:54 +01:00
Vadim Zeitlin
83b02930f4 Remove cppunit.m4 inclusion from aclocal.m4
This should have been done in e70fc11ef1
when CppUnit was replaced with Catch.
2017-11-07 18:27:44 +01:00