See https://github.com/wxWidgets/wxWidgets/pull/944
This commit is contained in:
Vadim Zeitlin
2018-09-22 14:43:14 +02:00
55 changed files with 229 additions and 206 deletions

View File

@@ -45,33 +45,55 @@ endfunction()
wx_add_demo(bombs wx_add_demo(bombs
bombs.cpp bombs.cpp
bombs.h
bombs1.cpp bombs1.cpp
game.cpp game.cpp
game.h
) )
wx_add_demo(forty wx_add_demo(forty
forty.cpp
canvas.cpp canvas.cpp
canvas.h
card.cpp card.cpp
card.h
forty.cpp
forty.h
game.cpp game.cpp
game.h
pile.cpp pile.cpp
pile.h
playerdg.cpp playerdg.cpp
playerdg.h
scoredg.cpp scoredg.cpp
scoredg.h
scorefil.cpp scorefil.cpp
scorefil.h
DATA DATA
about.htm about.htm
LIBRARIES LIBRARIES
html xml html xml
) )
wx_add_demo(fractal fractal.cpp)
wx_add_demo(fractal
fractal.cpp
)
wx_add_demo(life wx_add_demo(life
life.cpp
dialogs.cpp dialogs.cpp
dialogs.h
game.cpp game.cpp
game.h
life.cpp
life.h
reader.cpp reader.cpp
reader.h
DATA DATA
breeder.lif breeder.lif
) )
wx_add_demo(poem wxpoem.cpp
wx_add_demo(poem
wxpoem.cpp
wxpoem.h
DATA DATA
wxpoem.txt wxpoem.dat wxpoem.idx wxpoem.txt wxpoem.dat wxpoem.idx
LIBRARIES LIBRARIES

View File

@@ -24,6 +24,7 @@ set(TEST_DRAWING_SRC
testprec.h testprec.h
testableframe.h testableframe.h
testimage.h testimage.h
drawing/drawing.h
drawing/gcfactory.h drawing/gcfactory.h
drawing/plugin.h drawing/plugin.h
drawing/pluginsample.cpp drawing/pluginsample.cpp

View File

@@ -21,7 +21,7 @@ class BombsFrame;
class BombsApp: public wxApp class BombsApp: public wxApp
{ {
public: public:
virtual bool OnInit(); virtual bool OnInit() wxOVERRIDE;
private : private :
BombsFrame *m_frame; BombsFrame *m_frame;

View File

@@ -23,7 +23,7 @@ public:
FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& size); FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& size);
virtual ~FortyCanvas(); virtual ~FortyCanvas();
virtual void OnDraw(wxDC& dc); virtual void OnDraw(wxDC& dc) wxOVERRIDE;
bool OnCloseCanvas(); bool OnCloseCanvas();
void OnMouseEvent(wxMouseEvent& event); void OnMouseEvent(wxMouseEvent& event);
void SetCursorStyle(int x, int y); void SetCursorStyle(int x, int y);

View File

@@ -17,7 +17,7 @@ class FortyApp: public wxApp
public: public:
FortyApp(){} FortyApp(){}
virtual ~FortyApp(); virtual ~FortyApp();
bool OnInit(); bool OnInit() wxOVERRIDE;
static const wxColour& BackgroundColour(); static const wxColour& BackgroundColour();
static const wxColour& TextColour(); static const wxColour& TextColour();

View File

@@ -24,11 +24,11 @@ class Pack : public Pile {
public: public:
Pack(int x, int y); Pack(int x, int y);
virtual ~Pack(); virtual ~Pack();
void Redraw(wxDC& dc); void Redraw(wxDC& dc) wxOVERRIDE;
void ResetPile() { m_topCard = NumCards - 1; } void ResetPile() wxOVERRIDE { m_topCard = NumCards - 1; }
void Shuffle(); void Shuffle();
void AddCard(Card* card); // Add card void AddCard(Card* card) wxOVERRIDE; // Add card
void AddCard(wxDC& dc, Card* card) { AddCard(card); Redraw(dc); } void AddCard(wxDC& dc, Card* card) wxOVERRIDE { AddCard(card); Redraw(dc); }
}; };
@@ -39,7 +39,7 @@ class Base : public Pile {
public: public:
Base(int x, int y); Base(int x, int y);
virtual ~Base(){} virtual ~Base(){}
bool AcceptCard(Card* card); bool AcceptCard(Card* card) wxOVERRIDE;
}; };
@@ -50,7 +50,7 @@ class Foundation : public Pile {
public: public:
Foundation(int x, int y); Foundation(int x, int y);
virtual ~Foundation(){} virtual ~Foundation(){}
bool AcceptCard(Card* card); bool AcceptCard(Card* card) wxOVERRIDE;
}; };
@@ -61,9 +61,9 @@ class Discard : public Pile {
public: public:
Discard(int x, int y); Discard(int x, int y);
virtual ~Discard(){} virtual ~Discard(){}
void Redraw(wxDC& dc); void Redraw(wxDC& dc) wxOVERRIDE;
void GetTopCardPos(int& x, int& y); void GetTopCardPos(int& x, int& y) wxOVERRIDE;
Card* RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset); Card* RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset) wxOVERRIDE;
}; };

View File

@@ -27,7 +27,7 @@ private:
ScoreFile* m_scoreFile; ScoreFile* m_scoreFile;
wxButton* m_OK; wxButton* m_OK;
wxDECLARE_EVENT_TABLE(); wxDECLARE_EVENT_TABLE();
}; };
#endif #endif

View File

@@ -54,7 +54,7 @@ static wxMenuBar *menuBar = NULL;
class MyApp: public wxApp class MyApp: public wxApp
{ {
public: public:
bool OnInit(); bool OnInit() wxOVERRIDE;
}; };
wxIMPLEMENT_APP(MyApp); wxIMPLEMENT_APP(MyApp);

View File

@@ -926,8 +926,8 @@ class LifeModule: public wxModule
public: public:
LifeModule() {}; LifeModule() {};
bool OnInit(); bool OnInit() wxOVERRIDE;
void OnExit(); void OnExit() wxOVERRIDE;
}; };
wxIMPLEMENT_DYNAMIC_CLASS(LifeModule, wxModule); wxIMPLEMENT_DYNAMIC_CLASS(LifeModule, wxModule);

View File

@@ -431,10 +431,10 @@ void LifeFrame::OnMenu(wxCommandEvent& event)
m_running = true; m_running = true;
m_topspeed = true; m_topspeed = true;
UpdateUI(); UpdateUI();
const long YIELD_INTERVAL = 1000 / 30; const long YIELD_INTERVAL = 1000 / 30;
wxMilliClock_t lastyield = 0, now; wxMilliClock_t lastyield = 0, now;
while (m_running && m_topspeed) while (m_running && m_topspeed)
{ {
OnStep(); OnStep();
@@ -444,7 +444,7 @@ void LifeFrame::OnMenu(wxCommandEvent& event)
lastyield = now; lastyield = now;
} }
} }
break; break;
} }
} }
@@ -797,17 +797,17 @@ void LifeCanvas::DrawCell(wxInt32 i, wxInt32 j, wxDC &dc)
void LifeCanvas::DrawChanged() void LifeCanvas::DrawChanged()
{ {
wxClientDC dc(this); wxClientDC dc(this);
size_t ncells; size_t ncells;
LifeCell *cells; LifeCell *cells;
bool done = false; bool done = false;
m_life->BeginFind(m_viewportX, m_life->BeginFind(m_viewportX,
m_viewportY, m_viewportY,
m_viewportX + m_viewportW, m_viewportX + m_viewportW,
m_viewportY + m_viewportH, m_viewportY + m_viewportH,
true); true);
if (m_cellsize == 1) if (m_cellsize == 1)
{ {
dc.SetPen(*wxWHITE_PEN); dc.SetPen(*wxWHITE_PEN);
@@ -818,11 +818,11 @@ void LifeCanvas::DrawChanged()
dc.SetBrush(*wxWHITE_BRUSH); dc.SetBrush(*wxWHITE_BRUSH);
} }
dc.SetLogicalFunction(wxXOR); dc.SetLogicalFunction(wxXOR);
while (!done) while (!done)
{ {
done = m_life->FindMore(&cells, &ncells); done = m_life->FindMore(&cells, &ncells);
for (size_t m = 0; m < ncells; m++) for (size_t m = 0; m < ncells; m++)
DrawCell(cells[m].i, cells[m].j, dc); DrawCell(cells[m].i, cells[m].j, dc);
} }

View File

@@ -153,7 +153,7 @@ private:
class LifeApp : public wxApp class LifeApp : public wxApp
{ {
public: public:
virtual bool OnInit(); virtual bool OnInit() wxOVERRIDE;
}; };
#endif // _LIFE_APP_H_ #endif // _LIFE_APP_H_

View File

@@ -21,8 +21,8 @@
class MyApp: public wxApp class MyApp: public wxApp
{ {
public: public:
bool OnInit(); bool OnInit() wxOVERRIDE;
int OnExit(); int OnExit() wxOVERRIDE;
}; };
wxDECLARE_APP(MyApp); wxDECLARE_APP(MyApp);

View File

@@ -275,7 +275,7 @@ private:
eltype *Delete(long lhash, long key) \ eltype *Delete(long lhash, long key) \
{ return (eltype*)DoDelete(key, lhash); } \ { return (eltype*)DoDelete(key, lhash); } \
private: \ private: \
virtual void DoDeleteContents( wxHashTableBase_Node* node ) \ virtual void DoDeleteContents( wxHashTableBase_Node* node ) wxOVERRIDE\
{ delete (eltype*)node->GetData(); } \ { delete (eltype*)node->GetData(); } \
\ \
wxDECLARE_NO_COPY_CLASS(hashclass); \ wxDECLARE_NO_COPY_CLASS(hashclass); \

View File

@@ -163,7 +163,7 @@ public:
} }
protected: protected:
virtual int Invoke(wxDialog *dlg) const virtual int Invoke(wxDialog *dlg) const wxOVERRIDE
{ {
DialogType *t = dynamic_cast<DialogType*>(dlg); DialogType *t = dynamic_cast<DialogType*>(dlg);
if ( t ) if ( t )
@@ -173,7 +173,7 @@ protected:
} }
/// Returns description of the expected dialog (by default, its class). /// Returns description of the expected dialog (by default, its class).
virtual wxString GetDefaultDescription() const virtual wxString GetDefaultDescription() const wxOVERRIDE
{ {
return wxGetDialogClassDescription<T>(wxCLASSINFO(T)); return wxGetDialogClassDescription<T>(wxCLASSINFO(T));
} }
@@ -220,7 +220,7 @@ public:
} }
protected: protected:
virtual int OnInvoked(T *WXUNUSED(dlg)) const virtual int OnInvoked(T *WXUNUSED(dlg)) const wxOVERRIDE
{ {
return m_id; return m_id;
} }
@@ -239,7 +239,7 @@ public:
} }
protected: protected:
virtual wxString GetDefaultDescription() const virtual wxString GetDefaultDescription() const wxOVERRIDE
{ {
// It can be useful to show which buttons the expected message box was // It can be useful to show which buttons the expected message box was
// supposed to have, in case there could have been several of them. // supposed to have, in case there could have been several of them.
@@ -289,7 +289,7 @@ public:
} }
protected: protected:
virtual int OnInvoked(wxFileDialog *dlg) const virtual int OnInvoked(wxFileDialog *dlg) const wxOVERRIDE
{ {
dlg->SetPath(m_path); dlg->SetPath(m_path);
return m_id; return m_id;
@@ -351,7 +351,7 @@ public:
} }
protected: protected:
virtual int Enter(wxDialog *dlg) virtual int Enter(wxDialog *dlg) wxOVERRIDE
{ {
while ( !m_expectations.empty() ) while ( !m_expectations.empty() )
{ {

View File

@@ -76,7 +76,7 @@ public:
// this one is called on application startup and is a good place for the app // this one is called on application startup and is a good place for the app
// initialization (doing it here and not in the ctor allows to have an error // initialization (doing it here and not in the ctor allows to have an error
// return: if OnInit() returns false, the application terminates) // return: if OnInit() returns false, the application terminates)
virtual bool OnInit(); virtual bool OnInit() wxOVERRIDE;
}; };
@@ -199,7 +199,7 @@ public:
FrameAccessible(wxWindow* win): wxWindowAccessible(win) {} FrameAccessible(wxWindow* win): wxWindowAccessible(win) {}
// Gets the name of the specified object. // Gets the name of the specified object.
virtual wxAccStatus GetName(int childId, wxString* name) virtual wxAccStatus GetName(int childId, wxString* name) wxOVERRIDE
{ {
if (childId == wxACC_SELF) if (childId == wxACC_SELF)
{ {
@@ -217,7 +217,7 @@ public:
ScrolledWindowAccessible(wxWindow* win): wxWindowAccessible(win) {} ScrolledWindowAccessible(wxWindow* win): wxWindowAccessible(win) {}
// Gets the name of the specified object. // Gets the name of the specified object.
virtual wxAccStatus GetName(int childId, wxString* name) virtual wxAccStatus GetName(int childId, wxString* name) wxOVERRIDE
{ {
if (childId == wxACC_SELF) if (childId == wxACC_SELF)
{ {
@@ -235,36 +235,36 @@ public:
SplitterWindowAccessible(wxWindow* win): wxWindowAccessible(win) {} SplitterWindowAccessible(wxWindow* win): wxWindowAccessible(win) {}
// Gets the name of the specified object. // Gets the name of the specified object.
virtual wxAccStatus GetName(int childId, wxString* name); virtual wxAccStatus GetName(int childId, wxString* name) wxOVERRIDE;
// Can return either a child object, or an integer // Can return either a child object, or an integer
// representing the child element, starting from 1. // representing the child element, starting from 1.
virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** childObject); virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** childObject) wxOVERRIDE;
// Returns the rectangle for this object (id = 0) or a child element (id > 0). // Returns the rectangle for this object (id = 0) or a child element (id > 0).
virtual wxAccStatus GetLocation(wxRect& rect, int elementId); virtual wxAccStatus GetLocation(wxRect& rect, int elementId) wxOVERRIDE;
// Navigates from fromId to toId/toObject. // Navigates from fromId to toId/toObject.
virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, virtual wxAccStatus Navigate(wxNavDir navDir, int fromId,
int* toId, wxAccessible** toObject); int* toId, wxAccessible** toObject) wxOVERRIDE;
// Gets the number of children. // Gets the number of children.
virtual wxAccStatus GetChildCount(int* childCount); virtual wxAccStatus GetChildCount(int* childCount) wxOVERRIDE;
// Gets the specified child (starting from 1). // Gets the specified child (starting from 1).
// If *child is NULL and return value is wxACC_OK, // If *child is NULL and return value is wxACC_OK,
// this means that the child is a simple element and // this means that the child is a simple element and
// not an accessible object. // not an accessible object.
virtual wxAccStatus GetChild(int childId, wxAccessible** child); virtual wxAccStatus GetChild(int childId, wxAccessible** child) wxOVERRIDE;
// Gets the parent, or NULL. // Gets the parent, or NULL.
virtual wxAccStatus GetParent(wxAccessible** parent); virtual wxAccStatus GetParent(wxAccessible** parent) wxOVERRIDE;
// Performs the default action. childId is 0 (the action for this object) // Performs the default action. childId is 0 (the action for this object)
// or > 0 (the action for a child). // or > 0 (the action for a child).
// Return wxACC_NOT_SUPPORTED if there is no default action for this // Return wxACC_NOT_SUPPORTED if there is no default action for this
// window (e.g. an edit control). // window (e.g. an edit control).
virtual wxAccStatus DoDefaultAction(int childId); virtual wxAccStatus DoDefaultAction(int childId) wxOVERRIDE;
// Gets the default action for this object (0) or > 0 (the action for a child). // Gets the default action for this object (0) or > 0 (the action for a child).
// Return wxACC_OK even if there is no action. actionName is the action, or the empty // Return wxACC_OK even if there is no action. actionName is the action, or the empty
@@ -272,36 +272,36 @@ public:
// The retrieved string describes the action that is performed on an object, // The retrieved string describes the action that is performed on an object,
// not what the object does as a result. For example, a toolbar button that prints // not what the object does as a result. For example, a toolbar button that prints
// a document has a default action of "Press" rather than "Prints the current document." // a document has a default action of "Press" rather than "Prints the current document."
virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName); virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName) wxOVERRIDE;
// Returns the description for this object or a child. // Returns the description for this object or a child.
virtual wxAccStatus GetDescription(int childId, wxString* description); virtual wxAccStatus GetDescription(int childId, wxString* description) wxOVERRIDE;
// Returns help text for this object or a child, similar to tooltip text. // Returns help text for this object or a child, similar to tooltip text.
virtual wxAccStatus GetHelpText(int childId, wxString* helpText); virtual wxAccStatus GetHelpText(int childId, wxString* helpText) wxOVERRIDE;
// Returns the keyboard shortcut for this object or child. // Returns the keyboard shortcut for this object or child.
// Return e.g. ALT+K // Return e.g. ALT+K
virtual wxAccStatus GetKeyboardShortcut(int childId, wxString* shortcut); virtual wxAccStatus GetKeyboardShortcut(int childId, wxString* shortcut) wxOVERRIDE;
// Returns a role constant. // Returns a role constant.
virtual wxAccStatus GetRole(int childId, wxAccRole* role); virtual wxAccStatus GetRole(int childId, wxAccRole* role) wxOVERRIDE;
// Returns a state constant. // Returns a state constant.
virtual wxAccStatus GetState(int childId, long* state); virtual wxAccStatus GetState(int childId, long* state) wxOVERRIDE;
// Returns a localized string representing the value for the object // Returns a localized string representing the value for the object
// or child. // or child.
virtual wxAccStatus GetValue(int childId, wxString* strValue); virtual wxAccStatus GetValue(int childId, wxString* strValue) wxOVERRIDE;
// Selects the object or child. // Selects the object or child.
virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags); virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags) wxOVERRIDE;
// Gets the window with the keyboard focus. // Gets the window with the keyboard focus.
// If childId is 0 and child is NULL, no object in // If childId is 0 and child is NULL, no object in
// this subhierarchy has the focus. // this subhierarchy has the focus.
// If this object has the focus, child should be 'this'. // If this object has the focus, child should be 'this'.
virtual wxAccStatus GetFocus(int* childId, wxAccessible** child); virtual wxAccStatus GetFocus(int* childId, wxAccessible** child) wxOVERRIDE;
// Gets a variant representing the selected children // Gets a variant representing the selected children
// of this object. // of this object.
@@ -311,7 +311,7 @@ public:
// - an integer representing the selected child element, // - an integer representing the selected child element,
// or 0 if this object is selected (GetType() == wxT("long")) // or 0 if this object is selected (GetType() == wxT("long"))
// - a "void*" pointer to a wxAccessible child object // - a "void*" pointer to a wxAccessible child object
virtual wxAccStatus GetSelections(wxVariant* selections); virtual wxAccStatus GetSelections(wxVariant* selections) wxOVERRIDE;
}; };

View File

@@ -58,8 +58,8 @@ public:
class MainApp : public wxApp class MainApp : public wxApp
{ {
public: public:
virtual bool OnInit(); virtual bool OnInit() wxOVERRIDE;
virtual int OnExit(); virtual int OnExit() wxOVERRIDE;
}; };

View File

@@ -13,7 +13,7 @@ class MyApp: public wxApp
{ {
public: public:
MyApp(void){}; MyApp(void){};
bool OnInit(void); bool OnInit(void) wxOVERRIDE;
}; };
class MyFrame: public wxFrame class MyFrame: public wxFrame

View File

@@ -31,7 +31,7 @@
class OwnerDrawnApp: public wxApp class OwnerDrawnApp: public wxApp
{ {
public: public:
bool OnInit(); bool OnInit() wxOVERRIDE;
}; };
// Define a new frame type // Define a new frame type

View File

@@ -42,7 +42,7 @@
class RegApp : public wxApp class RegApp : public wxApp
{ {
public: public:
bool OnInit(); bool OnInit() wxOVERRIDE;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -487,15 +487,15 @@ public:
m_value = value; m_value = value;
} }
virtual bool Eq(wxVariantData& WXUNUSED(data)) const virtual bool Eq(wxVariantData& WXUNUSED(data)) const wxOVERRIDE
{ {
return false; return false;
} }
// What type is it? Return a string name. // What type is it? Return a string name.
virtual wxString GetType() const { return "MyClass"; } virtual wxString GetType() const wxOVERRIDE { return "MyClass"; }
virtual wxVariantData* Clone() const virtual wxVariantData* Clone() const wxOVERRIDE
{ {
return new wxMyVariantData(m_value); return new wxMyVariantData(m_value);
} }

View File

@@ -1159,7 +1159,7 @@ template <class NotifierT, class EntryT>
class ArchiveNotifier : public NotifierT class ArchiveNotifier : public NotifierT
{ {
public: public:
void OnEntryUpdated(EntryT& WXUNUSED(entry)) { } void OnEntryUpdated(EntryT& WXUNUSED(entry)) wxOVERRIDE { }
}; };
template <class ClassFactoryT> template <class ClassFactoryT>

View File

@@ -42,8 +42,8 @@ public:
~TestOutputStream() { delete [] m_data; } ~TestOutputStream() { delete [] m_data; }
int GetOptions() const { return m_options; } int GetOptions() const { return m_options; }
wxFileOffset GetLength() const { return m_size; } wxFileOffset GetLength() const wxOVERRIDE { return m_size; }
bool IsSeekable() const { return (m_options & PipeOut) == 0; } bool IsSeekable() const wxOVERRIDE { return (m_options & PipeOut) == 0; }
// gives away the data, this stream is then empty, and can be reused // gives away the data, this stream is then empty, and can be reused
void GetData(char*& data, size_t& size); void GetData(char*& data, size_t& size);
@@ -51,9 +51,9 @@ public:
private: private:
void Init(); void Init();
wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode) wxOVERRIDE;
wxFileOffset OnSysTell() const; wxFileOffset OnSysTell() const wxOVERRIDE;
size_t OnSysWrite(const void *buffer, size_t size); size_t OnSysWrite(const void *buffer, size_t size) wxOVERRIDE;
int m_options; int m_options;
size_t m_pos; size_t m_pos;
@@ -71,7 +71,7 @@ public:
AtLast = 0x01, // eof before an attempt to read past the last byte AtLast = 0x01, // eof before an attempt to read past the last byte
WithError = 0x02 // give an error instead of eof WithError = 0x02 // give an error instead of eof
}; };
// ctor takes the data from the output stream, which is then empty // ctor takes the data from the output stream, which is then empty
TestInputStream(TestOutputStream& out, int eoftype) TestInputStream(TestOutputStream& out, int eoftype)
: m_data(NULL), m_eoftype(eoftype) { SetData(out); } : m_data(NULL), m_eoftype(eoftype) { SetData(out); }
@@ -80,17 +80,17 @@ public:
~TestInputStream() { delete [] m_data; } ~TestInputStream() { delete [] m_data; }
void Rewind(); void Rewind();
wxFileOffset GetLength() const { return m_size; } wxFileOffset GetLength() const wxOVERRIDE { return m_size; }
bool IsSeekable() const { return (m_options & PipeIn) == 0; } bool IsSeekable() const wxOVERRIDE { return (m_options & PipeIn) == 0; }
void SetData(TestOutputStream& out); void SetData(TestOutputStream& out);
void Chop(size_t size) { m_size = size; } void Chop(size_t size) { m_size = size; }
char& operator [](size_t pos) { return m_data[pos]; } char& operator [](size_t pos) { return m_data[pos]; }
private: private:
wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode) wxOVERRIDE;
wxFileOffset OnSysTell() const; wxFileOffset OnSysTell() const wxOVERRIDE;
size_t OnSysRead(void *buffer, size_t size); size_t OnSysRead(void *buffer, size_t size) wxOVERRIDE;
int m_options; int m_options;
size_t m_pos; size_t m_pos;
@@ -171,7 +171,7 @@ protected:
typedef typename ClassFactoryT::pairiter_type PairIterT; typedef typename ClassFactoryT::pairiter_type PairIterT;
// the entry point for the test // the entry point for the test
void runTest(); void runTest() wxOVERRIDE;
// create the test data // create the test data
void CreateTestData(); void CreateTestData();

View File

@@ -42,19 +42,19 @@ public:
{ } { }
protected: protected:
void OnCreateArchive(wxZipOutputStream& zip); void OnCreateArchive(wxZipOutputStream& zip) wxOVERRIDE;
void OnArchiveExtracted(wxZipInputStream& zip, int expectedTotal); void OnArchiveExtracted(wxZipInputStream& zip, int expectedTotal) wxOVERRIDE;
void OnCreateEntry(wxZipOutputStream& zip, void OnCreateEntry(wxZipOutputStream& zip,
TestEntry& testEntry, TestEntry& testEntry,
wxZipEntry *entry); wxZipEntry *entry) wxOVERRIDE;
void OnEntryExtracted(wxZipEntry& entry, void OnEntryExtracted(wxZipEntry& entry,
const TestEntry& testEntry, const TestEntry& testEntry,
wxZipInputStream *arc); wxZipInputStream *arc) wxOVERRIDE;
void OnSetNotifier(EntryT& entry); void OnSetNotifier(EntryT& entry) wxOVERRIDE;
int m_count; int m_count;
wxString m_comment; wxString m_comment;
@@ -136,7 +136,7 @@ void ZipTestCase::OnEntryExtracted(wxZipEntry& entry,
class ZipNotifier : public wxZipNotifier class ZipNotifier : public wxZipNotifier
{ {
public: public:
void OnEntryUpdated(wxZipEntry& entry); void OnEntryUpdated(wxZipEntry& entry) wxOVERRIDE;
}; };
void ZipNotifier::OnEntryUpdated(wxZipEntry& entry) void ZipNotifier::OnEntryUpdated(wxZipEntry& entry)
@@ -166,7 +166,7 @@ public:
{ } { }
protected: protected:
void runTest(); void runTest() wxOVERRIDE;
int m_options; int m_options;
int m_id; int m_id;
}; };

View File

@@ -150,7 +150,7 @@ void CmdLineTestCase::ParseSwitches()
class NoMessageOutput : public wxMessageOutput class NoMessageOutput : public wxMessageOutput
{ {
public: public:
virtual void Output(const wxString& WXUNUSED(str)) { } virtual void Output(const wxString& WXUNUSED(str)) wxOVERRIDE { }
} noMessages; } noMessages;
wxMessageOutput * const old = wxMessageOutput::Set(&noMessages); wxMessageOutput * const old = wxMessageOutput::Set(&noMessages);

View File

@@ -111,7 +111,7 @@ public:
wxExpectModal(int valueToSet) : m_valueToSet(valueToSet) {} wxExpectModal(int valueToSet) : m_valueToSet(valueToSet) {}
protected: protected:
virtual int OnInvoked(MyDialog *dlg) const virtual int OnInvoked(MyDialog *dlg) const wxOVERRIDE
{ {
// Simulate the user entering the expected number: // Simulate the user entering the expected number:
dlg->m_value = m_valueToSet; dlg->m_value = m_valueToSet;

View File

@@ -282,7 +282,7 @@ void ItemContainerTestCase::SetSelection()
class CommandEventHandler : public wxEvtHandler class CommandEventHandler : public wxEvtHandler
{ {
public: public:
virtual bool ProcessEvent(wxEvent& event) virtual bool ProcessEvent(wxEvent& event) wxOVERRIDE
{ {
CPPUNIT_ASSERT_MESSAGE CPPUNIT_ASSERT_MESSAGE
( (

View File

@@ -57,30 +57,30 @@ void MarkupTestCase::RoundTrip()
const wxString& GetText() const { return m_text; } const wxString& GetText() const { return m_text; }
virtual void OnText(const wxString& text) { m_text += text; } virtual void OnText(const wxString& text) wxOVERRIDE { m_text += text; }
virtual void OnBoldStart() { m_text += "<b>"; } virtual void OnBoldStart() wxOVERRIDE { m_text += "<b>"; }
virtual void OnBoldEnd() { m_text += "</b>"; } virtual void OnBoldEnd() wxOVERRIDE { m_text += "</b>"; }
virtual void OnItalicStart() { m_text += "<i>"; } virtual void OnItalicStart() wxOVERRIDE { m_text += "<i>"; }
virtual void OnItalicEnd() { m_text += "</i>"; } virtual void OnItalicEnd() wxOVERRIDE { m_text += "</i>"; }
virtual void OnUnderlinedStart() { m_text += "<u>"; } virtual void OnUnderlinedStart() wxOVERRIDE { m_text += "<u>"; }
virtual void OnUnderlinedEnd() { m_text += "</u>"; } virtual void OnUnderlinedEnd() wxOVERRIDE { m_text += "</u>"; }
virtual void OnStrikethroughStart() { m_text += "<s>"; } virtual void OnStrikethroughStart() wxOVERRIDE { m_text += "<s>"; }
virtual void OnStrikethroughEnd() { m_text += "</s>"; } virtual void OnStrikethroughEnd() wxOVERRIDE { m_text += "</s>"; }
virtual void OnBigStart() { m_text += "<big>"; } virtual void OnBigStart() wxOVERRIDE { m_text += "<big>"; }
virtual void OnBigEnd() { m_text += "</big>"; } virtual void OnBigEnd() wxOVERRIDE { m_text += "</big>"; }
virtual void OnSmallStart() { m_text += "<small>"; } virtual void OnSmallStart() wxOVERRIDE { m_text += "<small>"; }
virtual void OnSmallEnd() { m_text += "</small>"; } virtual void OnSmallEnd() wxOVERRIDE { m_text += "</small>"; }
virtual void OnTeletypeStart() { m_text += "<tt>"; } virtual void OnTeletypeStart() wxOVERRIDE { m_text += "<tt>"; }
virtual void OnTeletypeEnd() { m_text += "</tt>"; } virtual void OnTeletypeEnd() wxOVERRIDE { m_text += "</tt>"; }
virtual void OnSpanStart(const wxMarkupSpanAttributes& attrs) virtual void OnSpanStart(const wxMarkupSpanAttributes& attrs) wxOVERRIDE
{ {
m_text << "<span"; m_text << "<span";
@@ -131,7 +131,7 @@ void MarkupTestCase::RoundTrip()
m_text << ">"; m_text << ">";
} }
virtual void OnSpanEnd(const wxMarkupSpanAttributes& WXUNUSED(attrs)) virtual void OnSpanEnd(const wxMarkupSpanAttributes& WXUNUSED(attrs)) wxOVERRIDE
{ {
m_text += "</span>"; m_text += "</span>";
} }

View File

@@ -73,7 +73,7 @@ void VirtListCtrlTestCase::setUp()
} }
protected: protected:
virtual wxString OnGetItemText(long item, long column) const virtual wxString OnGetItemText(long item, long column) const wxOVERRIDE
{ {
return wxString::Format("Row %ld, col %ld", item, column); return wxString::Format("Row %ld, col %ld", item, column);
} }

View File

@@ -62,14 +62,14 @@ private:
{ {
public: public:
virtual ~ImageGraphicsContextLifeCycle() {} virtual ~ImageGraphicsContextLifeCycle() {}
virtual wxString GetIdForFileName () const { return "image"; } virtual wxString GetIdForFileName () const wxOVERRIDE { return "image"; }
virtual wxString GetExtensionForFileName () const { return "png"; } virtual wxString GetExtensionForFileName () const wxOVERRIDE { return "png"; }
virtual bool UseImageComparison() const { return true; } virtual bool UseImageComparison() const wxOVERRIDE { return true; }
virtual bool PlatformIndependent() const { return false; } virtual bool PlatformIndependent() const wxOVERRIDE { return false; }
virtual wxGraphicsContext *BuildNewContext (wxSize expectedSize, virtual wxGraphicsContext *BuildNewContext (wxSize expectedSize,
double pointsPerInch, const wxFileName &targetFileName); double pointsPerInch, const wxFileName &targetFileName) wxOVERRIDE;
virtual void SaveBuiltContext (wxGraphicsContext *&gc); virtual void SaveBuiltContext (wxGraphicsContext *&gc) wxOVERRIDE;
virtual void CleanUp (wxGraphicsContext *gc); virtual void CleanUp (wxGraphicsContext *gc) wxOVERRIDE;
private: private:
wxImage *m_image; wxImage *m_image;
wxString m_targetFileName; wxString m_targetFileName;
@@ -81,14 +81,14 @@ private:
class SvgGraphicsContextLifeCycle: public DrawingTestGCFactory class SvgGraphicsContextLifeCycle: public DrawingTestGCFactory
{ {
public: public:
virtual wxString GetIdForFileName () const { return "svg"; } virtual wxString GetIdForFileName () const wxOVERRIDE { return "svg"; }
virtual wxString GetExtensionForFileName () const { return "svg"; } virtual wxString GetExtensionForFileName () const wxOVERRIDE { return "svg"; }
virtual bool UseImageComparison() const { return false; } virtual bool UseImageComparison() const wxOVERRIDE { return false; }
virtual bool PlatformIndependent() const { return true; } virtual bool PlatformIndependent() const wxOVERRIDE { return true; }
virtual wxGraphicsContext *BuildNewContext (wxSize expectedSize, virtual wxGraphicsContext *BuildNewContext (wxSize expectedSize,
double pointsPerInch, const wxFileName &targetFileName); double pointsPerInch, const wxFileName &targetFileName) wxOVERRIDE;
virtual void SaveBuiltContext (wxGraphicsContext *&gc); virtual void SaveBuiltContext (wxGraphicsContext *&gc) wxOVERRIDE;
virtual void CleanUp (wxGraphicsContext *gc); virtual void CleanUp (wxGraphicsContext *gc) wxOVERRIDE;
private: private:
wxSVGFileDC *m_svgFileDc; wxSVGFileDC *m_svgFileDc;

View File

@@ -32,18 +32,18 @@ public:
virtual ~SampleDrawingTestGCFactory() { virtual ~SampleDrawingTestGCFactory() {
} }
virtual wxString GetIdForFileName () const { return "sample-plg"; } virtual wxString GetIdForFileName () const wxOVERRIDE { return "sample-plg"; }
virtual wxString GetExtensionForFileName () const { return "bmp"; } virtual wxString GetExtensionForFileName () const wxOVERRIDE { return "bmp"; }
// Bitmaps are handled by wx code they should be binarily equal // Bitmaps are handled by wx code they should be binarily equal
virtual bool UseImageComparison() const { return false; } virtual bool UseImageComparison() const wxOVERRIDE { return false; }
// We use wxGraphicsContext, its implementation is not platform independent // We use wxGraphicsContext, its implementation is not platform independent
// and returns may slightly vary // and returns may slightly vary
virtual bool PlatformIndependent() const { return false; } virtual bool PlatformIndependent() const wxOVERRIDE { return false; }
virtual wxGraphicsContext *BuildNewContext (wxSize expectedSize, virtual wxGraphicsContext *BuildNewContext (wxSize expectedSize,
double WXUNUSED(pointsPerInch), const wxFileName &targetFileName) { double WXUNUSED(pointsPerInch), const wxFileName &targetFileName) wxOVERRIDE {
m_image = new wxImage (expectedSize); m_image = new wxImage (expectedSize);
m_image->InitAlpha(); m_image->InitAlpha();
@@ -57,14 +57,14 @@ public:
// Let's the opportunity to actually save the context and associated data // Let's the opportunity to actually save the context and associated data
// If saving requires deleting the wxGraphicsContext object the // If saving requires deleting the wxGraphicsContext object the
// implementer is free to do it but @c gc must then be nulled // implementer is free to do it but @c gc must then be nulled
virtual void SaveBuiltContext (wxGraphicsContext *&gc) { virtual void SaveBuiltContext (wxGraphicsContext *&gc) wxOVERRIDE {
wxDELETE(gc); wxDELETE(gc);
m_image->SaveFile (m_targetFileName); m_image->SaveFile (m_targetFileName);
} }
// Cleans @c gc and internal data if any // Cleans @c gc and internal data if any
virtual void CleanUp (wxGraphicsContext *gc) { virtual void CleanUp (wxGraphicsContext *gc) wxOVERRIDE {
delete gc; delete gc;
m_targetFileName.Empty(); m_targetFileName.Empty();
wxDELETE(m_image); wxDELETE(m_image);

View File

@@ -32,7 +32,7 @@ class MyEvent : public wxEvent
public: public:
MyEvent() : wxEvent(0, MyEventType) { } MyEvent() : wxEvent(0, MyEventType) { }
virtual wxEvent *Clone() const { return new MyEvent; } virtual wxEvent *Clone() const wxOVERRIDE { return new MyEvent; }
}; };
typedef void (wxEvtHandler::*MyEventFunction)(MyEvent&); typedef void (wxEvtHandler::*MyEventFunction)(MyEvent&);

View File

@@ -63,7 +63,7 @@ public:
{ {
} }
virtual void Notify() virtual void Notify() wxOVERRIDE
{ {
m_loop.ScheduleExit(m_rc); m_loop.ScheduleExit(m_rc);
} }
@@ -87,7 +87,7 @@ public:
{ {
} }
virtual void Notify() virtual void Notify() wxOVERRIDE
{ {
wxEventLoop loopInner; wxEventLoop loopInner;
ScheduleLoopExitTimer timerInner(loopInner, EXIT_CODE_INNER_LOOP); ScheduleLoopExitTimer timerInner(loopInner, EXIT_CODE_INNER_LOOP);

View File

@@ -71,7 +71,7 @@ public:
// override ProcessEvent() to confirm that it is called for all event // override ProcessEvent() to confirm that it is called for all event
// handlers in the chain // handlers in the chain
virtual bool ProcessEvent(wxEvent& event) virtual bool ProcessEvent(wxEvent& event) wxOVERRIDE
{ {
if ( event.GetEventType() == m_evtType ) if ( event.GetEventType() == m_evtType )
g_str += 'o'; // "o" == "overridden" g_str += 'o'; // "o" == "overridden"
@@ -190,7 +190,7 @@ public:
Update(); Update();
} }
virtual void OnDraw(wxDC& WXUNUSED(dc)) virtual void OnDraw(wxDC& WXUNUSED(dc)) wxOVERRIDE
{ {
g_str += 'D'; // draw g_str += 'D'; // draw
} }
@@ -360,7 +360,7 @@ void EventPropagationTestCase::ForwardEvent()
public: public:
ForwardEvtHandler(wxEvtHandler& h) : m_h(&h) { } ForwardEvtHandler(wxEvtHandler& h) : m_h(&h) { }
virtual bool ProcessEvent(wxEvent& event) virtual bool ProcessEvent(wxEvent& event) wxOVERRIDE
{ {
g_str += 'f'; g_str += 'f';
@@ -516,7 +516,7 @@ class EventTestView : public wxView
public: public:
EventTestView() { } EventTestView() { }
virtual void OnDraw(wxDC*) { } virtual void OnDraw(wxDC*) wxOVERRIDE { }
wxDECLARE_DYNAMIC_CLASS(EventTestView); wxDECLARE_DYNAMIC_CLASS(EventTestView);
}; };

View File

@@ -94,7 +94,7 @@ void TimerEventTestCase::OneShot()
} }
private: private:
virtual void Tick() { m_loop.Exit(); } virtual void Tick() wxOVERRIDE { m_loop.Exit(); }
wxEventLoopBase& m_loop; wxEventLoopBase& m_loop;

View File

@@ -135,7 +135,7 @@ private:
return wxExecuteReturnCode; return wxExecuteReturnCode;
} }
void Notify() void Notify() wxOVERRIDE
{ {
// Run wxExecute inside the event loop. // Run wxExecute inside the event loop.
wxExecuteReturnCode = wxExecute(command, flags, callback); wxExecuteReturnCode = wxExecute(command, flags, callback);
@@ -323,7 +323,7 @@ public:
} }
// may be overridden to be notified about process termination // may be overridden to be notified about process termination
virtual void OnTerminate(int WXUNUSED(pid), int WXUNUSED(status)) virtual void OnTerminate(int WXUNUSED(pid), int WXUNUSED(status)) wxOVERRIDE
{ {
wxEventLoop::GetActive()->ScheduleExit(); wxEventLoop::GetActive()->ScheduleExit();
} }
@@ -469,7 +469,7 @@ void ExecTestCase::TestOverlappedSyncExecute()
StartOnce(10); StartOnce(10);
} }
virtual void Notify() virtual void Notify() wxOVERRIDE
{ {
wxExecute(m_command, m_outputArray); wxExecute(m_command, m_outputArray);
} }

View File

@@ -147,12 +147,12 @@ class TestDirTraverser : public wxDirTraverser
public: public:
wxArrayString dirs; wxArrayString dirs;
virtual wxDirTraverseResult OnFile(const wxString& WXUNUSED(filename)) virtual wxDirTraverseResult OnFile(const wxString& WXUNUSED(filename)) wxOVERRIDE
{ {
return wxDIR_CONTINUE; return wxDIR_CONTINUE;
} }
virtual wxDirTraverseResult OnDir(const wxString& dirname) virtual wxDirTraverseResult OnDir(const wxString& dirname) wxOVERRIDE
{ {
dirs.push_back(dirname); dirs.push_back(dirname);
return wxDIR_CONTINUE; return wxDIR_CONTINUE;

View File

@@ -39,9 +39,9 @@ public:
wxString RightLocation(const wxString& p) { return GetRightLocation(p); } wxString RightLocation(const wxString& p) { return GetRightLocation(p); }
wxString Anchor(const wxString& p) { return GetAnchor(p); } wxString Anchor(const wxString& p) { return GetAnchor(p); }
bool CanOpen(const wxString& WXUNUSED(url)) { return false; } bool CanOpen(const wxString& WXUNUSED(url)) wxOVERRIDE { return false; }
wxFSFile *OpenFile(wxFileSystem& WXUNUSED(fs), wxFSFile *OpenFile(wxFileSystem& WXUNUSED(fs),
const wxString& WXUNUSED(url)) { return NULL; } const wxString& WXUNUSED(url)) wxOVERRIDE { return NULL; }
}; };

View File

@@ -524,12 +524,12 @@ void FileSystemWatcherTestCase::TestEventCreate()
class EventTester : public EventHandler class EventTester : public EventHandler
{ {
public: public:
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
CPPUNIT_ASSERT(eg.CreateFile()); CPPUNIT_ASSERT(eg.CreateFile());
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
wxFileSystemWatcherEvent event(wxFSW_EVENT_CREATE); wxFileSystemWatcherEvent event(wxFSW_EVENT_CREATE);
event.SetPath(eg.m_file); event.SetPath(eg.m_file);
@@ -555,12 +555,12 @@ void FileSystemWatcherTestCase::TestEventDelete()
class EventTester : public EventHandler class EventTester : public EventHandler
{ {
public: public:
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
CPPUNIT_ASSERT(eg.DeleteFile()); CPPUNIT_ASSERT(eg.DeleteFile());
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
wxFileSystemWatcherEvent event(wxFSW_EVENT_DELETE); wxFileSystemWatcherEvent event(wxFSW_EVENT_DELETE);
event.SetPath(eg.m_old); event.SetPath(eg.m_old);
@@ -588,12 +588,12 @@ void FileSystemWatcherTestCase::TestEventRename()
class EventTester : public EventHandler class EventTester : public EventHandler
{ {
public: public:
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
CPPUNIT_ASSERT(eg.RenameFile()); CPPUNIT_ASSERT(eg.RenameFile());
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
wxFileSystemWatcherEvent event(wxFSW_EVENT_RENAME); wxFileSystemWatcherEvent event(wxFSW_EVENT_RENAME);
event.SetPath(eg.m_old); event.SetPath(eg.m_old);
@@ -619,12 +619,12 @@ void FileSystemWatcherTestCase::TestEventModify()
class EventTester : public EventHandler class EventTester : public EventHandler
{ {
public: public:
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
CPPUNIT_ASSERT(eg.ModifyFile()); CPPUNIT_ASSERT(eg.ModifyFile());
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
wxFileSystemWatcherEvent event(wxFSW_EVENT_MODIFY); wxFileSystemWatcherEvent event(wxFSW_EVENT_MODIFY);
event.SetPath(eg.m_file); event.SetPath(eg.m_file);
@@ -650,12 +650,12 @@ void FileSystemWatcherTestCase::TestEventAccess()
class EventTester : public EventHandler class EventTester : public EventHandler
{ {
public: public:
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
CPPUNIT_ASSERT(eg.ReadFile()); CPPUNIT_ASSERT(eg.ReadFile());
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
wxFileSystemWatcherEvent event(wxFSW_EVENT_ACCESS); wxFileSystemWatcherEvent event(wxFSW_EVENT_ACCESS);
event.SetPath(eg.m_file); event.SetPath(eg.m_file);
@@ -683,12 +683,12 @@ void FileSystemWatcherTestCase::TestEventAttribute()
class EventTester : public EventHandler class EventTester : public EventHandler
{ {
public: public:
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
CPPUNIT_ASSERT(eg.TouchFile()); CPPUNIT_ASSERT(eg.TouchFile());
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
wxFileSystemWatcherEvent event(wxFSW_EVENT_ATTRIB); wxFileSystemWatcherEvent event(wxFSW_EVENT_ATTRIB);
event.SetPath(eg.m_file); event.SetPath(eg.m_file);
@@ -718,7 +718,7 @@ void FileSystemWatcherTestCase::TestSingleWatchtypeEvent()
// DELETE as the event path fields would be wrong in CheckResult() // DELETE as the event path fields would be wrong in CheckResult()
EventTester() : EventHandler(wxFSW_EVENT_ACCESS) {} EventTester() : EventHandler(wxFSW_EVENT_ACCESS) {}
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
// As wxFSW_EVENT_ACCESS is passed to the ctor only ReadFile() will // As wxFSW_EVENT_ACCESS is passed to the ctor only ReadFile() will
// generate an event. Without it they all will, and the test fails // generate an event. Without it they all will, and the test fails
@@ -727,7 +727,7 @@ void FileSystemWatcherTestCase::TestSingleWatchtypeEvent()
CPPUNIT_ASSERT(eg.ReadFile()); CPPUNIT_ASSERT(eg.ReadFile());
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
wxFileSystemWatcherEvent event(wxFSW_EVENT_ACCESS); wxFileSystemWatcherEvent event(wxFSW_EVENT_ACCESS);
event.SetPath(eg.m_file); event.SetPath(eg.m_file);
@@ -925,7 +925,7 @@ void FileSystemWatcherTestCase::TestTrees()
CPPUNIT_ASSERT_EQUAL(0, m_watcher->GetWatchedPathsCount()); CPPUNIT_ASSERT_EQUAL(0, m_watcher->GetWatchedPathsCount());
} }
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
// We don't use this function for events. Just run the tests // We don't use this function for events. Just run the tests
@@ -963,14 +963,14 @@ void FileSystemWatcherTestCase::TestTrees()
Exit(); Exit();
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
CPPUNIT_FAIL("Shouldn't be called"); CPPUNIT_FAIL("Shouldn't be called");
return wxFileSystemWatcherEvent(wxFSW_EVENT_ERROR); return wxFileSystemWatcherEvent(wxFSW_EVENT_ERROR);
} }
virtual void CheckResult() virtual void CheckResult() wxOVERRIDE
{ {
// Do nothing. We override this to prevent receiving events in // Do nothing. We override this to prevent receiving events in
// ExpectedEvent() // ExpectedEvent()
@@ -1016,25 +1016,25 @@ public:
Start(1000, true); Start(1000, true);
} }
virtual void GenerateEvent() virtual void GenerateEvent() wxOVERRIDE
{ {
m_watcher->Remove(EventGenerator::GetWatchDir()); m_watcher->Remove(EventGenerator::GetWatchDir());
CPPUNIT_ASSERT(eg.CreateFile()); CPPUNIT_ASSERT(eg.CreateFile());
} }
virtual void CheckResult() virtual void CheckResult() wxOVERRIDE
{ {
CPPUNIT_ASSERT( m_events.empty() ); CPPUNIT_ASSERT( m_events.empty() );
} }
virtual wxFileSystemWatcherEvent ExpectedEvent() virtual wxFileSystemWatcherEvent ExpectedEvent() wxOVERRIDE
{ {
CPPUNIT_FAIL( "Shouldn't be called" ); CPPUNIT_FAIL( "Shouldn't be called" );
return wxFileSystemWatcherEvent(wxFSW_EVENT_ERROR); return wxFileSystemWatcherEvent(wxFSW_EVENT_ERROR);
} }
virtual void Notify() virtual void Notify() wxOVERRIDE
{ {
SendIdle(); SendIdle();
} }

View File

@@ -30,10 +30,10 @@ TEST_CASE("wxHtmlParser::ParseInvalid", "[html][parser][error]")
class NullParser : public wxHtmlWinParser class NullParser : public wxHtmlWinParser
{ {
public: public:
virtual wxObject *GetProduct() { return NULL; } virtual wxObject *GetProduct() wxOVERRIDE { return NULL; }
protected: protected:
virtual void AddText(const wxString& WXUNUSED(txt)) { } virtual void AddText(const wxString& WXUNUSED(txt)) wxOVERRIDE { }
}; };
NullParser p; NullParser p;

View File

@@ -319,7 +319,7 @@ public:
{ {
} }
virtual void Walk(size_t skip = 1, size_t maxdepth = wxSTACKWALKER_MAX_DEPTH) virtual void Walk(size_t skip = 1, size_t maxdepth = wxSTACKWALKER_MAX_DEPTH) wxOVERRIDE
{ {
wxPuts(wxT("Stack dump:")); wxPuts(wxT("Stack dump:"));
@@ -327,7 +327,7 @@ public:
} }
protected: protected:
virtual void OnStackFrame(const wxStackFrame& frame) virtual void OnStackFrame(const wxStackFrame& frame) wxOVERRIDE
{ {
wxPrintf("[%2zu] ", frame.GetLevel()); wxPrintf("[%2zu] ", frame.GetLevel());

View File

@@ -86,7 +86,7 @@ public:
protected: protected:
virtual void DoLogRecord(wxLogLevel level, virtual void DoLogRecord(wxLogLevel level,
const wxString& msg, const wxString& msg,
const wxLogRecordInfo& info) const wxLogRecordInfo& info) wxOVERRIDE
{ {
m_logs[level] = msg; m_logs[level] = msg;
m_logsInfo[level] = info; m_logsInfo[level] = info;

View File

@@ -28,8 +28,8 @@ char g_strLoadOrder[256] = "\0";
class Module : public wxModule class Module : public wxModule
{ {
protected: protected:
virtual bool OnInit() { wxStrcat(g_strLoadOrder, GetClassInfo()->GetClassName()); return true; } virtual bool OnInit() wxOVERRIDE { wxStrcat(g_strLoadOrder, GetClassInfo()->GetClassName()); return true; }
virtual void OnExit() { } virtual void OnExit() wxOVERRIDE { }
}; };
class ModuleA : public Module class ModuleA : public Module

View File

@@ -77,7 +77,7 @@ public:
protected: protected:
// run this testcase // run this testcase
void runTest(); void runTest() wxOVERRIDE;
private: private:
// workers // workers

View File

@@ -43,7 +43,7 @@ public:
{ } { }
protected: protected:
void runTest(); void runTest() wxOVERRIDE;
private: private:
wxString m_pattern; wxString m_pattern;
@@ -80,7 +80,7 @@ public:
{ } { }
protected: protected:
void runTest(); void runTest() wxOVERRIDE;
private: private:
wxString m_pattern; wxString m_pattern;
@@ -146,7 +146,7 @@ public:
{ } { }
protected: protected:
void runTest(); void runTest() wxOVERRIDE;
private: private:
wxString m_pattern; wxString m_pattern;

View File

@@ -33,7 +33,7 @@ public:
TestStream(const void *buf, size_t size) TestStream(const void *buf, size_t size)
: wxMemoryInputStream(buf, size) { } : wxMemoryInputStream(buf, size) { }
wxFileOffset GetLength() const { return wxInvalidOffset; } wxFileOffset GetLength() const wxOVERRIDE { return wxInvalidOffset; }
}; };

View File

@@ -70,7 +70,7 @@ public:
virtual ~LargeFileTest() { } virtual ~LargeFileTest() { }
protected: protected:
void runTest(); void runTest() wxOVERRIDE;
virtual wxInputStream *MakeInStream(const wxString& name) const = 0; virtual wxInputStream *MakeInStream(const wxString& name) const = 0;
virtual wxOutputStream *MakeOutStream(const wxString& name) const = 0; virtual wxOutputStream *MakeOutStream(const wxString& name) const = 0;
@@ -210,9 +210,9 @@ public:
LargeFileTest_wxFile() : LargeFileTest("wxFile streams") { } LargeFileTest_wxFile() : LargeFileTest("wxFile streams") { }
protected: protected:
wxInputStream *MakeInStream(const wxString& name) const; wxInputStream *MakeInStream(const wxString& name) const wxOVERRIDE;
wxOutputStream *MakeOutStream(const wxString& name) const; wxOutputStream *MakeOutStream(const wxString& name) const wxOVERRIDE;
bool HasLFS() const { return (wxFileOffset)0xffffffff > 0; } bool HasLFS() const wxOVERRIDE { return (wxFileOffset)0xffffffff > 0; }
}; };
wxInputStream *LargeFileTest_wxFile::MakeInStream(const wxString& name) const wxInputStream *LargeFileTest_wxFile::MakeInStream(const wxString& name) const
@@ -242,9 +242,9 @@ public:
LargeFileTest_wxFFile() : LargeFileTest("wxFFile streams") { } LargeFileTest_wxFFile() : LargeFileTest("wxFFile streams") { }
protected: protected:
wxInputStream *MakeInStream(const wxString& name) const; wxInputStream *MakeInStream(const wxString& name) const wxOVERRIDE;
wxOutputStream *MakeOutStream(const wxString& name) const; wxOutputStream *MakeOutStream(const wxString& name) const wxOVERRIDE;
bool HasLFS() const; bool HasLFS() const wxOVERRIDE;
}; };
wxInputStream *LargeFileTest_wxFFile::MakeInStream(const wxString& name) const wxInputStream *LargeFileTest_wxFFile::MakeInStream(const wxString& name) const

View File

@@ -66,7 +66,7 @@ public:
} }
protected: protected:
virtual void *Entry() virtual void *Entry() wxOVERRIDE
{ {
wxSocketServer srv(LocalAddress(m_port), wxSOCKET_REUSEADDR); wxSocketServer srv(LocalAddress(m_port), wxSOCKET_REUSEADDR);
CPPUNIT_ASSERT( srv.IsOk() ); CPPUNIT_ASSERT( srv.IsOk() );

View File

@@ -116,7 +116,7 @@ class VsnprintfTestCase : public CppUnit::TestCase
public: public:
VsnprintfTestCase() {} VsnprintfTestCase() {}
virtual void setUp(); virtual void setUp() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( VsnprintfTestCase ); CPPUNIT_TEST_SUITE( VsnprintfTestCase );

View File

@@ -186,11 +186,11 @@ public:
TestApp(); TestApp();
// standard overrides // standard overrides
virtual bool OnInit(); virtual bool OnInit() wxOVERRIDE;
virtual int OnExit(); virtual int OnExit() wxOVERRIDE;
#ifdef __WIN32__ #ifdef __WIN32__
virtual wxAppTraits *CreateTraits() virtual wxAppTraits *CreateTraits() wxOVERRIDE
{ {
// Define a new class just to customize CanUseStderr() behaviour. // Define a new class just to customize CanUseStderr() behaviour.
class TestAppTraits : public TestAppTraitsBase class TestAppTraits : public TestAppTraitsBase
@@ -200,11 +200,11 @@ public:
// in this case we really don't want to show any message boxes, as // in this case we really don't want to show any message boxes, as
// wxMessageOutputBest, used e.g. from the default implementation // wxMessageOutputBest, used e.g. from the default implementation
// of wxApp::OnUnhandledException(), would do by default. // of wxApp::OnUnhandledException(), would do by default.
virtual bool CanUseStderr() { return true; } virtual bool CanUseStderr() wxOVERRIDE { return true; }
// Overriding CanUseStderr() is not enough, we also need to // Overriding CanUseStderr() is not enough, we also need to
// override this one to avoid returning false from it. // override this one to avoid returning false from it.
virtual bool WriteToStderr(const wxString& text) virtual bool WriteToStderr(const wxString& text) wxOVERRIDE
{ {
wxFputs(text, stderr); wxFputs(text, stderr);
fflush(stderr); fflush(stderr);
@@ -221,7 +221,7 @@ public:
// Also override this method to avoid showing any dialogs from here -- and // Also override this method to avoid showing any dialogs from here -- and
// show some details about the exception along the way. // show some details about the exception along the way.
virtual bool OnExceptionInMainLoop() virtual bool OnExceptionInMainLoop() wxOVERRIDE
{ {
wxFprintf(stderr, "Unhandled exception in the main loop: %s\n", wxFprintf(stderr, "Unhandled exception in the main loop: %s\n",
Catch::translateActiveException()); Catch::translateActiveException());
@@ -230,8 +230,8 @@ public:
} }
// used by events propagation test // used by events propagation test
virtual int FilterEvent(wxEvent& event); virtual int FilterEvent(wxEvent& event) wxOVERRIDE;
virtual bool ProcessEvent(wxEvent& event); virtual bool ProcessEvent(wxEvent& event) wxOVERRIDE;
void SetFilterEventFunc(FilterEventFunc f) { m_filterEventFunc = f; } void SetFilterEventFunc(FilterEventFunc f) { m_filterEventFunc = f; }
void SetProcessEventFunc(ProcessEventFunc f) { m_processEventFunc = f; } void SetProcessEventFunc(ProcessEventFunc f) { m_processEventFunc = f; }
@@ -269,7 +269,7 @@ public:
event.Skip(); event.Skip();
} }
virtual int OnRun() virtual int OnRun() wxOVERRIDE
{ {
if ( TestAppBase::OnRun() != 0 ) if ( TestAppBase::OnRun() != 0 )
m_exitcode = EXIT_FAILURE; m_exitcode = EXIT_FAILURE;
@@ -277,7 +277,7 @@ public:
return m_exitcode; return m_exitcode;
} }
#else // !wxUSE_GUI #else // !wxUSE_GUI
virtual int OnRun() virtual int OnRun() wxOVERRIDE
{ {
return RunTests(); return RunTests();
} }

View File

@@ -62,7 +62,7 @@ private:
m_operateOn(operateOn), m_testType(testType) {} m_operateOn(operateOn), m_testType(testType) {}
// thread execution starts here // thread execution starts here
virtual void *Entry(); virtual void *Entry() wxOVERRIDE;
public: public:
wxAtomicInt &m_operateOn; wxAtomicInt &m_operateOn;

View File

@@ -37,7 +37,7 @@ public:
{ m_n = n; Create(); } { m_n = n; Create(); }
// thread execution starts here // thread execution starts here
virtual ExitCode Entry(); virtual ExitCode Entry() wxOVERRIDE;
private: private:
size_t m_n; size_t m_n;
@@ -70,10 +70,10 @@ public:
} }
// thread execution starts here // thread execution starts here
virtual ExitCode Entry(); virtual ExitCode Entry() wxOVERRIDE;
// and stops here // and stops here
virtual void OnExit(); virtual void OnExit() wxOVERRIDE;
private: private:
size_t m_n; // number of characters to write size_t m_n; // number of characters to write
@@ -130,7 +130,7 @@ public:
Create(); Create();
} }
virtual ExitCode Entry() virtual ExitCode Entry() wxOVERRIDE
{ {
//wxPrintf(wxT("Thread %lu has started running.\n"), GetId()); //wxPrintf(wxT("Thread %lu has started running.\n"), GetId());
gs_cond.Post(); gs_cond.Post();
@@ -165,7 +165,7 @@ public:
Create(); Create();
} }
virtual ExitCode Entry() virtual ExitCode Entry() wxOVERRIDE
{ {
wxUnusedVar(m_i); wxUnusedVar(m_i);

View File

@@ -55,7 +55,7 @@ private:
{} {}
// thread execution starts here // thread execution starts here
virtual void *Entry(); virtual void *Entry() wxOVERRIDE;
// Thread message queue // Thread message queue
Queue& GetQueue() Queue& GetQueue()

View File

@@ -56,7 +56,7 @@ public:
// ctor both creates and starts the thread // ctor both creates and starts the thread
TLSTestThread() : wxThread(wxTHREAD_JOINABLE) { Create(); Run(); } TLSTestThread() : wxThread(wxTHREAD_JOINABLE) { Create(); Run(); }
virtual void *Entry() virtual void *Entry() wxOVERRIDE
{ {
gs_threadInt = 17; gs_threadInt = 17;

View File

@@ -37,7 +37,7 @@ class wxTestEvent : public wxEvent
{ {
public: public:
wxTestEvent(wxEventType type = wxEVT_TEST) : wxEvent(0, type) { } wxTestEvent(wxEventType type = wxEVT_TEST) : wxEvent(0, type) { }
virtual wxEvent *Clone() const { return new wxTestEvent(GetEventType()); } virtual wxEvent *Clone() const wxOVERRIDE { return new wxTestEvent(GetEventType()); }
}; };
class wxTestSink : public wxEvtHandler class wxTestSink : public wxEvtHandler

View File

@@ -56,7 +56,7 @@ private:
} }
protected: protected:
virtual wxSize DoGetBestSize() const { return wxSize(50, 250); } virtual wxSize DoGetBestSize() const wxOVERRIDE { return wxSize(50, 250); }
}; };
wxWindow *m_win; wxWindow *m_win;