[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevelop/plugins/xtest
From: Manuel Breugelmans <mbr.nxi () gmail ! com>
Date: 2008-08-31 21:38:49
Message-ID: 1220218729.060475.26888.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 855481 by mbreugel:
Krazy fixes.
M +3 -3 check/checkplugin.h
M +3 -3 cppunit/cppunitplugin.h
M +2 -3 examples/qtest_cmake/moneytest.cpp
M +2 -2 qtest/casebuilder.cpp
M +2 -2 qtest/executable.cpp
M +2 -2 qtest/executable.h
M +19 -12 qtest/kdevregister.cpp
M +1 -0 qtest/kdevregister.h
M +2 -2 qtest/outputview/qtestoutputjob.cpp
M +1 -1 qtest/qtestcase.h
M +3 -3 qtest/qtestoutputmorpher.h
M +3 -3 qtest/qtestplugin.h
M +4 -4 qtest/suitebuilder.cpp
M +3 -3 qtest/suitebuilder.h
M +2 -2 qtest/tests/qtestoutputmorphertest.h
M +3 -3 qtest/xmlregister.h
--- trunk/KDE/kdevelop/plugins/xtest/check/checkplugin.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef CHECK_CHECKVIEW
-#define CHECK_CHECKVIEW
+#ifndef CHECK_CHECKPLUGIN
+#define CHECK_CHECKPLUGIN
#include <veritas/testrunnertoolview.h>
#include <QVariantList>
@@ -43,4 +43,4 @@
};
-#endif // CHECK_CHECKVIEW
+#endif // CHECK_CHECKPLUGIN
--- trunk/KDE/kdevelop/plugins/xtest/cppunit/cppunitplugin.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef CPPUNIT_CPPUNITVIEW_H
-#define CPPUNIT_CPPUNITVIEW_H
+#ifndef CPPUNIT_CPPUNITPLUGIN_H
+#define CPPUNIT_CPPUNITPLUGIN_H
#include <interfaces/iplugin.h>
#include <veritas/testrunnertoolview.h>
@@ -40,4 +40,4 @@
CppUnitRunnerViewFactory* m_factory;
};
-#endif // CPPUNIT_CPPUNITVIEW_H
+#endif // CPPUNIT_CPPUNITPLUGIN_H
--- trunk/KDE/kdevelop/plugins/xtest/examples/qtest_cmake/moneytest.cpp #855480:855481
@@ -15,13 +15,12 @@
* 02110-1301, USA.
*/
+#include "moneytest.h"
+#include "money.h"
#include <QtTest/QtTest>
#include <QDebug>
-#include "money.h"
-#include "moneytest.h"
-
void MoneyTest::create()
{
Money m(5, "USD");
--- trunk/KDE/kdevelop/plugins/xtest/qtest/casebuilder.cpp #855480:855481
@@ -53,8 +53,8 @@
QFileInfo exeLocation(m_executable->location().path());
QString cazeName = m_executable->name();
- if (!m_suite.isEmpty() && cazeName.startsWith(m_suite + "-")) {
- QStringList spl = cazeName.split("-");
+ if (!m_suite.isEmpty() && cazeName.startsWith(m_suite + '-')) {
+ QStringList spl = cazeName.split('-');
Q_ASSERT(spl.count() > 1);
spl.removeFirst();
cazeName = spl.join("-");
--- trunk/KDE/kdevelop/plugins/xtest/qtest/executable.cpp #855480:855481
@@ -58,13 +58,13 @@
proc.waitForFinished(-1);
// this output is typically minimal, a handful of lines
QByteArray output = proc.readAllStandardOutput();
- return QString(output).split("\n");
+ return QString(output).split('\n');
}
QString Executable::name() const
{
ASSERT_SANE_LOCATION
- return m_location.fileName().split(".")[0];
+ return m_location.fileName().split('.')[0];
}
KUrl Executable::location() const
--- trunk/KDE/kdevelop/plugins/xtest/qtest/executable.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef VERITAS_QTEST_QTESTEXE_H
-#define VERITAS_QTEST_QTESTEXE_H
+#ifndef VERITAS_QTEST_EXECUTABLE_H
+#define VERITAS_QTEST_EXECUTABLE_H
#include <KUrl>
#include "qxqtestexport.h"
--- trunk/KDE/kdevelop/plugins/xtest/qtest/kdevregister.cpp #855480:855481
@@ -123,7 +123,7 @@
QDir current(dir);
current.setFilter(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Readable | QDir::Writable);
QStringList subDirs = current.entryList();
- foreach(QString subDir, subDirs) {
+ foreach(const QString& subDir, subDirs) {
if (subDir == "CMakeFiles") continue;
current.cd(subDir);
testExes += findTestExesIn(current, testNames);
@@ -202,6 +202,8 @@
m_testTargets = fetchAllTestTargets(project()->projectItem());
m_testNames = namesFromTargets(m_testTargets);
fetchTestCommands(0);
+
+ emit showErrorMessage(QString("FOOBAR"), 10);
}
void KDevRegister::buildTests()
@@ -241,25 +243,30 @@
return i18n("xTest");
}
-#include <QApplication>
#include <QMainWindow>
#include <QStatusBar>
+#include <interfaces/iuicontroller.h>
+
void KDevRegister::registerStatus()
{
// TODO get rid of this joke. Factually istatus should not be
// limitted to plugins + backgroundparser, but exposed for all
- QWidget* mw = QApplication::activeWindow();
- if (!mw) { kDebug() << "No mw"; return; }
- QList<QStatusBar*> sbs = mw->findChildren<QStatusBar*>();
- if (sbs.isEmpty()) { kDebug() << "No statusbar"; return; }
- QStatusBar* sb = sbs[0];
- if (!sb) { kDebug() << "sb zero"; return; }
- connect(this, SIGNAL(showProgress(int,int,int)),
- sb, SLOT(showProgress(int,int,int)));
- connect(this, SIGNAL(hideProgress()),
- sb, SLOT(hideProgress()));
+// QWidget* mw = QApplication::activeWindow();
+// if (!mw) { kDebug() << "No mw"; return; }
+// QList<QStatusBar*> sbs = mw->findChildren<QStatusBar*>();
+// if (sbs.isEmpty()) { kDebug() << "No statusbar"; return; }
+// QStatusBar* sb = sbs[0];
+// if (!sb) { kDebug() << "sb zero"; return; }
+// connect(this, SIGNAL(showProgress(int,int,int)),
+// sb, SLOT(showProgress(int,int,int)));
+// connect(this, SIGNAL(hideProgress()),
+// sb, SLOT(hideProgress()));
+// connect(this, SIGNAL(showErrorMessage(QString,int)),
+// sb, SLOT(showErrorMessage(QString,int)));
+ IUiController* uic = ICore::self()->uiController();
+ uic->registerStatus(this);
}
--- trunk/KDE/kdevelop/plugins/xtest/qtest/kdevregister.h #855480:855481
@@ -59,6 +59,7 @@
void showMessage(const QString&, int timeout=0);
void hideProgress();
void showProgress(int minimum, int maximum, int value);
+ void showErrorMessage(QString, int timeout);
// IStatus
private slots:
--- trunk/KDE/kdevelop/plugins/xtest/qtest/outputview/qtestoutputjob.cpp #855480:855481
@@ -66,12 +66,12 @@
QString path_ = path.path();
QFile f(path_);
if (!f.exists()) {
- kError() << "Test ouput file does not exist [" << path_ << "]";
+ kError() << "Test output file does not exist [" << path_ << "]";
return;
}
f.open(QIODevice::ReadOnly);
if (!f.isOpen()) {
- kError() << "Failed to open test ouput file for reading [" << path_ << "]";
+ kError() << "Failed to open test output file for reading [" << path_ << "]";
return;
}
QTextStream stream(&f);
--- trunk/KDE/kdevelop/plugins/xtest/qtest/qtestcase.h #855480:855481
@@ -71,7 +71,7 @@
KUrl outFile() const;
KUrl errorFile() const;
- /*! For testers only method that returns wheter the output file was closed */
+ /*! For testers only method that returns whether the output file was closed */
bool fto_outputFileClosed();
private:
--- trunk/KDE/kdevelop/plugins/xtest/qtest/qtestoutputmorpher.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef QTEST_QTESTOUPUTMORPHER
-#define QTEST_QTESTOUPUTMORPHER
+#ifndef QTEST_QTESTOUTPUTMORPHER
+#define QTEST_QTESTOUTPUTMORPHER
#include <QXmlStreamReader>
#include "qxqtestexport.h"
@@ -78,4 +78,4 @@
}
-#endif // QTEST_QTESTOUPUTMORPHER
+#endif // QTEST_QTESTOUTPUTMORPHER
--- trunk/KDE/kdevelop/plugins/xtest/qtest/qtestplugin.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef QTEST_QTESTVIEW_H
-#define QTEST_QTESTVIEW_H
+#ifndef QTEST_QTESTPLUGIN_H
+#define QTEST_QTESTPLUGIN_H
#include <KUrl>
#include <QMap>
@@ -69,4 +69,4 @@
KDevelop::IProject* m_proj;
};
-#endif // QTEST_QTESTVIEW_H
+#endif // QTEST_QTESTPLUGIN_H
--- trunk/KDE/kdevelop/plugins/xtest/qtest/suitebuilder.cpp #855480:855481
@@ -57,7 +57,7 @@
}
namespace {
-QStringList testDirs(QString("tests,test,Tests").split(","));
+QStringList testDirs(QString("tests,test,Tests").split(','));
}
/*! deduce the suite name for a test exe name. take the directory name
@@ -106,10 +106,10 @@
{
// create a suite per test directory.
Q_ASSERT(m_root); Q_ASSERT(m_testExesSet);
- foreach(KUrl testExe, m_testShellExes) {
+ foreach(const KUrl& testExe, m_testShellExes) {
addSuiteName(testExe);
}
- foreach(KUrl testExe, m_testShellExes) {
+ foreach(const KUrl& testExe, m_testShellExes) {
QString suiteName = m_suiteNames[testExe.upUrl()];
if (!m_suites.contains(suiteName)) {
QFileInfo suiteDir(testExe.upUrl().path());
@@ -124,7 +124,7 @@
{
int nrofShells = m_testShellExes.count();
int count = 1;
- foreach(KUrl testExe, m_testShellExes) {
+ foreach(const KUrl& testExe, m_testShellExes) {
QString suiteName = m_suiteNames[testExe.upUrl()];
CaseBuilder* cb = createCaseBuilder(testExe);
cb->setSuiteName(suiteName);
--- trunk/KDE/kdevelop/plugins/xtest/qtest/suitebuilder.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef VERITAS_QTEST_RESOLVEJOB_H
-#define VERITAS_QTEST_RESOLVEJOB_H
+#ifndef VERITAS_QTEST_SUITEBUILDER_H
+#define VERITAS_QTEST_SUITEBUILDER_H
#include <QMap>
#include <QFileInfoList>
@@ -88,4 +88,4 @@
}
-#endif // VERITAS_QTEST_RESOLVEJOB_H
+#endif // VERITAS_QTEST_SUITEBUILDER_H
--- trunk/KDE/kdevelop/plugins/xtest/qtest/tests/qtestoutputmorphertest.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef QTEST_QTESTOUTPUTMORPHER
-#define QTEST_QTESTOUTPUTMORPHER
+#ifndef QTEST_QTESTOUTPUTMORPHERTEST
+#define QTEST_QTESTOUTPUTMORPHERTEST
#include <QtTest/QtTest>
--- trunk/KDE/kdevelop/plugins/xtest/qtest/xmlregister.h #855480:855481
@@ -18,8 +18,8 @@
* 02110-1301, USA.
*/
-#ifndef QXQTEST_QTESTREGISTER_H
-#define QXQTEST_QTESTREGISTER_H
+#ifndef QXQTEST_XMLREGISTER_H
+#define QXQTEST_XMLREGISTER_H
#include <QXmlStreamReader>
#include <QList>
@@ -84,4 +84,4 @@
} // end namespace QTest
-#endif // QXQTEST_QTESTREGISTER_H
+#endif // QXQTEST_XMLREGISTER_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic