Revision: 352
http://ktutorial.svn.sourceforge.net/ktutorial/?rev=352&view=rev
Author: danxuliu
Date: 2012-07-03 08:59:08 +0000 (Tue, 03 Jul 2012)
Log Message:
-----------
Fix the name of the actions.
Modified Paths:
--------------
trunk/ktutorial/ktutorial-library/tests/KTutorialTest.cpp
Modified: trunk/ktutorial/ktutorial-library/tests/KTutorialTest.cpp
===================================================================
--- trunk/ktutorial/ktutorial-library/tests/KTutorialTest.cpp 2012-06-29 16:05:44 UTC (rev 351)
+++ trunk/ktutorial/ktutorial-library/tests/KTutorialTest.cpp 2012-07-03 08:59:08 UTC (rev 352)
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2011 by Daniel Calviño Sánchez *
+ * Copyright (C) 2011-2012 by Daniel Calviño Sánchez *
* dan...@gm... *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -56,7 +56,7 @@
QAction* mAction3_3_1_1;
void assertFindObject(const QString& objectName, QObject* object) const;
- void assertFindAction(const QString& objectName, QAction* widget) const;
+ void assertFindAction(const QString& objectName, QAction* action) const;
};
@@ -71,7 +71,7 @@
mObject1_1_1 = new QObject(parent1_1);
mObject1_1_1->setObjectName("The object");
mAction1_1_2 = new QAction(parent1_1);
- mAction1_1_2->setObjectName("The widget");
+ mAction1_1_2->setObjectName("The action");
QObject* parent1_2 = new QObject(grandParent1);
parent1_2->setObjectName("Parent2");
@@ -87,9 +87,9 @@
mObject2_1_2 = new QObject(parent2_1);
mObject2_1_2->setObjectName("Another object");
mAction2_1_3 = new QAction(parent2_1);
- mAction2_1_3->setObjectName("The widget");
+ mAction2_1_3->setObjectName("The action");
mAction2_1_4 = new QAction(parent2_1);
- mAction2_1_4->setObjectName("Another widget");
+ mAction2_1_4->setObjectName("Another action");
QObject* grandParent3 = new QObject(mMainWindow);
grandParent3->setObjectName("Grand parent3");
@@ -108,7 +108,7 @@
parent3_3->setObjectName("Nested timer");
QTimer* parent3_3_1 = new QTimer(parent3_3);
mAction3_3_1_1 = new QAction(parent3_3_1);
- mAction3_3_1_1->setObjectName("Another widget");
+ mAction3_3_1_1->setObjectName("Another action");
}
void KTutorialTest::cleanupTestCase() {
@@ -128,23 +128,23 @@
assertFindObject("Grand parent1/Parent2/The object", mObject1_2_1);
assertFindObject("Grand parent2/Parent1/The object", mObject2_1_1);
- assertFindAction("Grand parent1/Parent1/The widget", mAction1_1_2);
- assertFindAction("Grand parent2/Parent1/The widget", mAction2_1_3);
+ assertFindAction("Grand parent1/Parent1/The action", mAction1_1_2);
+ assertFindAction("Grand parent2/Parent1/The action", mAction2_1_3);
}
void KTutorialTest::testFindObjectComplexNameNestedChild() {
assertFindObject("Grand parent2/The object", mObject2_1_1);
assertFindObject("Nested parent/Another object", mObject3_2_1_1);
- assertFindAction("Grand parent2/The widget", mAction2_1_3);
- assertFindAction("Nested timer/Another widget", mAction3_3_1_1);
+ assertFindAction("Grand parent2/The action", mAction2_1_3);
+ assertFindAction("Nested timer/Another action", mAction3_3_1_1);
}
void KTutorialTest::testFindObjectComplexNameAncestorNameNotUnique() {
//The ancestor name is not unique, but the full path is
assertFindObject("Parent1/Another object", mObject2_1_2);
- assertFindAction("Parent1/Another widget", mAction2_1_4);
+ assertFindAction("Parent1/Another action", mAction2_1_4);
}
void KTutorialTest::testFindObjectComplexNameUnknownParent() {
@@ -176,8 +176,8 @@
}
void KTutorialTest::assertFindAction(const QString& objectName,
- QAction* widget) const {
- QCOMPARE(KTutorial::self()->findObject<QAction*>(objectName), widget);
+ QAction* action) const {
+ QCOMPARE(KTutorial::self()->findObject<QAction*>(objectName), action);
}
QTEST_MAIN(KTutorialTest)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|