Commit Graph

153 Commits

Author SHA1 Message Date
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Václav Slavík
17473a770a Fix lots of warnings reported by Clang.
Mostly potentially lossy implicit conversions in headers (long->int). Also dangling else warnings. Struct/class mismatches.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 16:41:34 +00:00
Vadim Zeitlin
102540a046 Add wxList::AsVector<>() helper.
This can be useful in legacy code using wxList to progressively replace it
with wxVector.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 17:36:44 +00:00
Vadim Zeitlin
1bc5ddea15 Fix link errors with VC 11 in DLL STL build.
Don't declare wxWindowList as DLL-exported. It's unnecessary and appears to
create problems for VC 11.

Closes #14741.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-10 00:53:42 +00:00
Stefan Neis
6dd0883d55 Do not put semicolons after the definition of an inline function.
Even though most compilers just ignore this, it's just wrong and if you
do get warnings about header files, they can become quite overwhelming.
Forward port of r70163.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 14:42:13 +00:00
Vadim Zeitlin
01871bf642 Add wxUSE_STD_CONTAINERS and turn it on by default.
Previously, wxUSE_STL enabled both implicit conversion of wxString to
std::[w]string and use of standard containers for the implementation of their
wx equivalents. Split up the two roles now by allowing to enable the use of
the standard containers independently of (backwards incompatible) implicit
conversion in wxString and actually enable wxUSE_STD_CONTAINERS by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 14:16:04 +00:00
Stefan Csomor
f67a33e3ad switching to assert
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 13:49:44 +00:00
Stefan Csomor
2f250cb6e6 guard against null ptr access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 07:36:18 +00:00
Vadim Zeitlin
20d88ec692 Move wxList::Member() to pseudo-template base list class.
Member() should be available in all list classes, not just specially crafted
list of wxObjects (wxList).

See #3616.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-10 12:48:36 +00:00
Vadim Zeitlin
8dd13d0fa1 Fix return value of wxList::insert() in non-STL builds.
The returned value was the same as the iterator that was passed in which could
even be invalid when appending.

Fix the wrong use of postfix decrement instead of prefix one and handle the
case of appending correctly.

Closes #11808.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 00:36:36 +00:00
Vadim Zeitlin
0f08aa4432 Change return type of wxList::Member() to bool.
It used to return a pointer in wxUSE_STL==0 build and an object in
wxUSE_STL==1 one making checking its return value difficult without provoking
warnings from either MSVC or g++ (see #11038).

Also, all the other occurrences of Member() already returned bool, including
the one in wxStringList so changing it to return bool in wxList itself is more
consistent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 17:10:58 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Vadim Zeitlin
ab13878f7b fix other insert() overloads to work when inserting at the end of the list, continuation of r56299 (see #10103)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 23:46:53 +00:00
Vadim Zeitlin
7b8b72b506 removed wrong check from splice(it, list, first)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 23:23:49 +00:00
Vadim Zeitlin
1416fc5ff6 fix wxList::erase(it, end()) in non-STL build (see #10103)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 23:10:56 +00:00
Francesco Montorsi
d48b06bd90 check in the 'selective yield' patch (see ticket #10320):
- implements YieldFor() with event filtering for wxMSW and wxGTK,
  adds TODO markers in other ports;
- replaces wxYield() in GTK's clipboard code with a wxTheApp->YieldFor() call, thus fixing possible reentrancies 
(and modifies clipboard sample to test synchronous IsSupported calls)
- replaces wxYieldIfNeeded() calls in wxProgressDialog with wxTheApp->YieldFor() calls, so that it processes only 
UI/user-input events, thus fixing the race condition visible in the "thread" sample
- documents the new functions


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-04 17:42:28 +00:00
Vadim Zeitlin
c23b255ab4 don't use annoying and unneeded in C++ casts of NULL to "T *"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-19 13:39:25 +00:00
Vadim Zeitlin
8ad170cb85 STL build: fix missing const which results in Insert(int, T) being called instead of Insert(iterator, T) via iterator->bool conversion (this fixes at least one test failure)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 16:57:11 +00:00
Vadim Zeitlin
5c33522fca replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-02 02:39:52 +00:00
Vadim Zeitlin
b9f9065e28 fix the bug in insert(end(), value) and added unit test for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-14 09:04:52 +00:00
Vadim Zeitlin
b547eb0f86 remove default value for the last parameter of insert(it, idx, value) which allowed insert(it, 17) to compile for lists of any type
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-14 08:59:05 +00:00
Robert Roebling
4f47a8d0c6 Move definition of wxListIteratorFunction and ..SortFuntion to defs.h so it can be used from elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-18 19:05:21 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Paul Cornett
162e998c2f check for self-assignment in operator=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-09 04:08:33 +00:00
Robin Dunn
c6ed07281f Remove WXDLLIMPEXP_BASE from the declaration of wxList_SortFunction
to resolve link errors with MSVC 7.1

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-08 22:41:28 +00:00
Vadim Zeitlin
f172cb8200 removed support for Salford compiler (which was almost certainly broken anyhow) (patch 1861133)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-31 10:05:00 +00:00
Robert Roebling
7e59e3d050 Made wxList no longer inherit from wxObject, no change in STL mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 22:00:10 +00:00
Václav Slavík
ad259ba5b2 copy the list in wxList::operator=(), for consistency with typed macro-based lists
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-27 15:01:12 +00:00
Václav Slavík
e5eaf55744 fixed visiblity attribute warnings in STL build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-08 21:55:22 +00:00
Václav Slavík
cae92a4988 VC6_WORKAROUND -> WX_LIST_VC6_WORKAROUND to prevent name conflicts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-08 21:26:32 +00:00
Václav Slavík
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Václav Slavík
5abefd049e compatibility fix: have wxListKey ctors from C strings so that passing string literals to functions expecting wxListKey works
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-27 20:50:15 +00:00
Vadim Zeitlin
b46b1d59d6 implement event loop for console applications (heavily modified patch 1715735)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-14 23:43:39 +00:00
Vadim Zeitlin
248d0a8970 move wxKEY_XXX constants to wx/defs.h from wx/list.h and wx/hash.h to avoid duplicating their declarations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-26 02:15:24 +00:00
Václav Slavík
8a7afe4dfe compilation fix for VC6 with wxUSE_STL=1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-15 18:47:19 +00:00
Václav Slavík
a4c1cdc9dc don't use the VC6 workaround in wxList with newer versions of VC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-14 11:04:30 +00:00
Václav Slavík
817270659e initial version of UTF-8 strings representation (still converting to wchar_t* a lot); it has to be explicitly enabled with --enable-utf8 for now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-12 21:15:07 +00:00
Vadim Zeitlin
c1dc9f8394 removed WXWIN_COMPATIBILITY_2_4 from common and wxMSW files (patch 1675546)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 11:35:04 +00:00
Vadim Zeitlin
cd840087aa fix compilation with wxUSE_STL=1 for VC6 (and presumably others) (bug 1614814)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-15 01:47:26 +00:00
Vadim Zeitlin
af867f957d fixed operator[] in wxUSE_STL build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-08 21:25:00 +00:00
Vadim Zeitlin
9ea1246ba6 added operator[] for STL builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-08 00:56:59 +00:00
Vadim Zeitlin
7d13fbc6dc don't use invalid/uninitialized iterator in wxList::compatibility_iterator in wxUSE_STL==1 case, this doesn't work with the debug version of glibc STL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-24 17:59:10 +00:00
Vadim Zeitlin
3871d4ca75 use proper dllexport declaration with _WX_LIST_HELPER_
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-02 01:10:41 +00:00
Vadim Zeitlin
2e4b087e1c reverted return type of wxList method to nodetype * from compatibility_iterator (undoing change of rev 1.103) because this breaks very old core relying on conversion of wxList::GetFirst() to wxNode* for example
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-23 16:19:48 +00:00
Vadim Zeitlin
30a29593e8 workaround for mingw 3.2.3 DLL build with wxUSE_STL=1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-23 02:01:25 +00:00
Vadim Zeitlin
d294c9db88 nested iterator classes must be dll-exported
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-23 01:01:50 +00:00