Commit Graph

68653 Commits

Author SHA1 Message Date
Vadim Zeitlin
b1f5203a08 Add an explicit #warning for missing dashes support in wxX11 wxDC
This is better than warnings about unused dash-related variables.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
6119a7c630 Suppress warnings about deprecated pango_xft_get_context()
We can still use it as long as it exists, there is no benefit whatsoever
in using the new functions as the old one does exactly the same thing
anyhow.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
eaee5416cf Remove unused PangoContext variable from X11 code
It's has been there since basically always, but seems to never have been
used, so remove it to avoid warnings.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
1cdfdcc3a8 Allow warnings in iOS build, there are too many of them
Mostly there are warnings about unused parameters because of
unimplemented functionality, but we don't have a simple way to disable
just those, so just don't use -Werror with this build at all.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
a4c1e542aa Use makefile flags when building the samples too
This will notably detect all warnings in them.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
85ad131adb Fix not handling #warning as errors for clang
clang uses "#warnings" warning category instead of "cpp" as gcc does and
complains about unknown "cpp" warning option if we use it with it.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
437b8eebec Pass -Werror on make command line
Setting CXXFLAGS=-Werror in the environment wasn't enough, it was still
overridden by the empty CXXFLAGS in the makefile.

Ideal would be to get rid of the empty flags there, but for now override
them on make command line explicitly.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
c4152869f5 Split wxMAKEFILE_FLAGS in separate CXX/LDFLAGS variables
This will allow appending extra CXXFLAGS to use with make in the
upcoming commit.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
b91d3e35cf Only use -Werror for building, not configuring
Use of -Werror results in failures of configure tests that should
normally succeed, e.g. testing for va_copy() when cross-compiling for
iOS, so don't do it and just enable -Werror for building our own code.
2020-07-06 13:13:35 +02:00
Vadim Zeitlin
42108c64f6 Avoid warnings about literals-to-char* conversions in wxMotif
Suppress -Wwrite-strings warnings.
2020-07-06 13:06:57 +02:00
Vadim Zeitlin
655b343246 Avoid unused variable warning in wxRibbon with wxUSE_TOOLTIPS==0 2020-07-06 13:06:03 +02:00
Vadim Zeitlin
3004e594b9 Replace deprecated wxDEFAULT with wxFONTFAMILY_DEFAULT in wxMotif
Just avoid a -Wdeprecated-declarations warning.
2020-07-06 13:04:18 +02:00
Vadim Zeitlin
7c268092bd Avoid an unused variable warning in wxUIActionSimulatorX11
This happens in wxMotif build, where this class probably doesn't work
anyhow, so just suppress it.
2020-07-06 13:03:09 +02:00
Vadim Zeitlin
698c356050 Fix -Wwrite-strings warning in non-Pango wxFontEnumerator code
Don't convert wxString::c_str() to decltype(wxT("*")), which is
non-const "wchar_t *". Just pass wxString to Printf() directly instead,
this is simpler and more efficient anyhow.
2020-07-06 12:58:16 +02:00
Vadim Zeitlin
e7bb37436a Warn if wxCairoContext(wxPrinterDC) ctor is not implemented
Use an explicit #warning to explain the problem. This is more
informative and avoids errors when building with -Werror (but also
-Wno-error=cpp).
2020-07-06 12:54:15 +02:00
Vadim Zeitlin
20e385e7bb Do not make explicit #warnings fatal in Travis CI builds
Don't give errors for the intentional warnings from #warning directives.
2020-07-06 12:52:01 +02:00
Vadim Zeitlin
31a1779a86 Keep building libraries/samples/tests in Travis CI tests
This is useful to see all the warnings at once instead of having to run
many builds to see them all.
2020-07-06 12:45:57 +02:00
Vadim Zeitlin
b48515d5cc squash! Treat warnings as errors in Travis CI builds
Add wxALLOW_WARNINGS which can be set to prevent this from happening for
the ports where we don't want to avoids warnings anyhow because they
indicate real problems in the code, such as wxDFB.
2020-07-06 12:44:25 +02:00
Vadim Zeitlin
3fc15101be Fix unhelpful unused parameter warning in wxX11 wxFontEnumerator
This warning can't really be avoided in this case, unless we decided not
to return any fonts at all if we can't test whether they're monospaced
or not, but this would probably be even less useful.
2020-07-06 12:40:03 +02:00
Vadim Zeitlin
1b9f57621d Add a forgotten wxOVERRIDE in the grid sample
Fix -Winconsistent-missing-override when building this sample.
2020-07-06 12:34:42 +02:00
Vadim Zeitlin
de6b4e4095 Use LocaleSetter class in wxTextCtrl test case
Replace manual calls to setlocale() with the existing helper class.

This makes the code slightly simpler and avoids -Wnoexcept-type warnings
due to using setlocale as template argument as a welcome side effect.
2020-07-06 12:32:38 +02:00
Vadim Zeitlin
d2e03dec77 Treat warnings as errors in Travis CI builds
This will allow detecting any new warnings immediately.
2020-07-06 00:30:41 +02:00
Stefan Csomor
9be2c3717d Improve native keyDown handling in wxOSX
Provide API for dealing with m_lastKeyDownEvent instead of using it
directly and extend it to avoid sending duplicate events for keys which
are mapped to multiple selectors, such as Ctrl-O with the default key
bindings.

Closes https://github.com/wxWidgets/wxWidgets/pull/1928
2020-07-06 00:13:18 +02:00
catalinr
de56f99c5a Bind user options to recreate static page in widgets sample
Make the various options on this page actually work.

Closes https://github.com/wxWidgets/wxWidgets/pull/1930
2020-07-06 00:11:33 +02:00
Vadim Zeitlin
d09ed641f2 Merge branch 'osx-10_10-min-10_11-SDK' of csomor/wxWidgets
Increase minimum required macOS SDK version to 10.11 and minimum support
macOS deployment version to 10.10.

See https://github.com/wxWidgets/wxWidgets/pull/1929
2020-07-06 00:08:44 +02:00
Vadim Zeitlin
b85d4fc758 Don't check macOS symbols when building for iOS in configure
We should probably check __IPHONE_OS_VERSION_MIN_REQUIRED and maybe
MAX_ALLOWED too, but for now just don't give an error in wxiOS builds.
2020-07-05 23:46:34 +02:00
Vadim Zeitlin
d3812ab091 Remove explicit C++11 options from Xcode 7.3 Travis CI build
They're not needed any longer as C++11 is used by default in wxOSX
builds if nothing else is specified.
2020-07-05 23:41:12 +02:00
Stefan Csomor
4fb1764d6b adapt naming to macOS 2020-07-05 21:03:32 +02:00
Vadim Zeitlin
232e8677b1 Enforce using C++11 under macOS in configure
There is no reason not to turn it on there, as all compilers/compiler
versions supported under this platform support C++11 too.
2020-07-05 19:50:24 +02:00
Vadim Zeitlin
c01747555f Remove explicit libc++ option, it is the default anyhow now
No supported version still use libstdc++ by default, so remove the
useless option.
2020-07-05 19:37:15 +02:00
Vadim Zeitlin
19dc182b48 Replace Mac OS X with macOS in configure
Use the new Apple OS name in the user-visible messages.
2020-07-05 19:36:29 +02:00
Vadim Zeitlin
94fc2ca6d8 Check minimum macOS version in configure too
Targeting anything less than 10.10 is not supported any longer, so check
for this and also update --with-macosx-version-min description in help
to mention it.
2020-07-05 19:34:27 +02:00
Vadim Zeitlin
a4f9e207dc Make macOS configure error messages even more precise
Mention the configure options to use to correct the problem explicitly.

Also restore the use AC_MSG_FAILURE() instead of AC_MSG_ERROR(), this
was originally correct and just the calls to exit() were unnecessary.
2020-07-05 19:29:26 +02:00
Vadim Zeitlin
9b02dbf8b2 Correct minimum supported Xcode version, it's 7.2.1, not 7.3
This correction is important because 7.2 can be used under macOS 10.10,
unlike 7.3.
2020-07-05 19:15:50 +02:00
Vadim Zeitlin
101a693bc2 Add check for 10.11 SDK to configure
Verify that we're using a supported version of SDK and further improve
the error message if building a test program fails to mention that Xcode
7.3 or later is required.
2020-07-05 18:21:58 +02:00
Vadim Zeitlin
bbf1953051 Improve error messages if configure build test fails under macOS
Telling people to try using a different SDK was rather confusing if they
didn't specify any SDK in the first place and not very helpful if the
problem was due to specifying an incompatible minimum OS version, so fix
both problems at once by using the appropriate error message depending
on the configure options actually used.
2020-07-05 18:16:00 +02:00
Vadim Zeitlin
01ac922431 Use 10.10 as minimum macOS version by default in configure
Just bump the default to 10.10 from the old 10.9.
2020-07-05 18:12:33 +02:00
Stefan Csomor
baeda25a67
Update docs/changes.txt
Co-authored-by: VZ <vz-github@zeitlins.org>
2020-07-05 17:26:32 +02:00
Stefan Csomor
dedefa65c1 applying CMake patch from @MaartenBent 2020-07-05 15:54:27 +02:00
Vadim Zeitlin
a9b419af51 Fix code determining the rows to refresh in wxGrid::SetColSize()
The changes in 15de1a4cf4 (Optimize refresh when resizing grid rows or
columns, 2020-02-18) incorrectly translated XToPos() used in
SetRowSize() to YToRow(), which compiled due to an implicit conversion
of m_gridWin pointer to bool, but did the wrong thing, as the wrong grid
window could be used for a frozen grid.

Fix this by switching to internalYToRow() which actually does what the
original code tried to do.

Co-authored-by: Artur Wieczorek <artwik@wp.pl>
2020-07-05 15:04:00 +02:00
Vadim Zeitlin
97924a3b81 Use internalYToRow() instead of YToRow(true)
No real changes, just be consistent: as we have internalYToRow() macro
which passes true as "clipToMinMax" YToRow() parameter instead of the
default false, use it everywhere instead of using it almost everywhere
and still using YToRow(true) and XToCol(true) explicitly just once each.

Also add a comment explaining the difference between internalAToB() and
public AToB() functions.
2020-07-05 14:58:02 +02:00
Stefan Csomor
c15d805a9f
macOS new DragSession API (#1919)
* new dragsession API

* Update src/osx/cocoa/dnd.mm

Co-authored-by: VZ <vz-github@zeitlins.org>

* Update src/osx/cocoa/dnd.mm

Co-authored-by: VZ <vz-github@zeitlins.org>

* Update src/osx/cocoa/dnd.mm

Co-authored-by: VZ <vz-github@zeitlins.org>

* avoid NSDragOperationDelete

* adding SDK 10.10 compatibility

* remove conditional compilation, upgrading travis to Xcode 7.3

* adding typedef NSPasteboardType for SDK < 10.13

Co-authored-by: VZ <vz-github@zeitlins.org>
2020-07-05 11:04:09 +02:00
Stefan Csomor
3e5b21e982 cleanup, make clause symmetric 2020-07-05 08:38:15 +02:00
Stefan Csomor
0f3bc09109 lower systems are not supported anymore, cleanup 2020-07-05 08:37:14 +02:00
Stefan Csomor
52ab8c43dd
Merge branch 'master' into osx-10_10-min-10_11-SDK 2020-07-04 23:03:55 +02:00
Stefan Csomor
21edba705d updating xcode 2020-07-04 22:45:02 +02:00
Tobias Taschner
1666f58bc6
Change documentation references from OS X to macOS (#1927)
Since OS X 10.12 it has been named macOS so it makes sense
to reference it in documentation as such, even when it
sometimes refers to older versions which were called (Mac) OS X.
2020-07-04 22:08:24 +02:00
Stefan Csomor
6cab9052b8 updating docs for min system 2020-07-04 21:28:13 +02:00
Stefan Csomor
89761300c8 always available with 10.11 SDK 2020-07-04 21:03:41 +02:00
Stefan Csomor
d49875f34f SDK 10.11 minimum 2020-07-04 20:47:20 +02:00