diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-09-06 07:46:20 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-09-06 07:46:20 +1000 |
commit | f8b043f1d73906be593232cf02aa06e576ae4e27 (patch) | |
tree | c42f4c4416802c2d03a8e9d8832937f81aca6b63 /src/testlib | |
parent | a1fa077083d32f48751d08de80babe63b4f8df39 (diff) | |
download | qt4-tools-f8b043f1d73906be593232cf02aa06e576ae4e27.tar.gz |
Fixed "multiple definition of `QTest::mouseActionNames'" error in
projects where two separate compilation units include `qtestmouse.h'.
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestmouse.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index bfa5c25f5c..8b06a29390 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -67,7 +67,6 @@ QT_MODULE(Test) namespace QTest { enum MouseAction { MousePress, MouseRelease, MouseClick, MouseDClick, MouseMove }; - const char *mouseActionNames[] = { "MousePress", "MouseRelease", "MouseClick", "MouseDClick", "MouseMove" }; static void mouseEvent(MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1) @@ -115,6 +114,8 @@ namespace QTest } QSpontaneKeyEvent::setSpontaneous(&me); if (!qApp->notify(widget, &me)) { + static const char *mouseActionNames[] = + { "MousePress", "MouseRelease", "MouseClick", "MouseDClick", "MouseMove" }; QString warning = QString::fromLatin1("Mouse event \"%1\" not accepted by receiving widget"); QTest::qWarn(warning.arg(mouseActionNames[static_cast<int>(action)]).toAscii().data()); } |