diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-09-05 21:46:20 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-09-05 21:46:20 (GMT) |
commit | f8b043f1d73906be593232cf02aa06e576ae4e27 (patch) | |
tree | c42f4c4416802c2d03a8e9d8832937f81aca6b63 /src/testlib/qtestmouse.h | |
parent | a1fa077083d32f48751d08de80babe63b4f8df39 (diff) | |
download | Qt-f8b043f1d73906be593232cf02aa06e576ae4e27.zip Qt-f8b043f1d73906be593232cf02aa06e576ae4e27.tar.gz Qt-f8b043f1d73906be593232cf02aa06e576ae4e27.tar.bz2 |
Fixed "multiple definition of `QTest::mouseActionNames'" error in
projects where two separate compilation units include `qtestmouse.h'.
Diffstat (limited to 'src/testlib/qtestmouse.h')
-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 bfa5c25..8b06a29 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()); } |