Add test application

wilder-work
Montel Laurent 10 years ago
parent 18ae35ed8b
commit d8ecf15042
  1. 5
      src/tests/CMakeLists.txt
  2. 40
      src/tests/searchdbustest.cpp
  3. 33
      src/tests/searchdbustest.h

@ -11,3 +11,8 @@ qt5_add_dbus_interfaces(dbustest_SRCS ${kmail_BINARY_DIR}/src/org.kde.kmail.kmai
add_executable(dbustest ${dbustest_SRCS})
add_dependencies(dbustest kmail_xml)
target_link_libraries(dbustest KF5::KIOCore KF5::I18n Qt5::DBus)
#####
set(searchdbustest_SRCS searchdbustest.cpp)
add_executable(searchdbustest ${searchdbustest_SRCS})
target_link_libraries(searchdbustest Qt5::DBus Qt5::Widgets)

@ -0,0 +1,40 @@
/*
Copyright (C) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "searchdbustest.h"
#include <QApplication>
searchdbustest::searchdbustest(QWidget *parent)
: QWidget(parent)
{
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
searchdbustest *w = new searchdbustest;
w->show();
app.exec();
delete w;
return 0;
}

@ -0,0 +1,33 @@
/*
Copyright (C) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef SEARCHDBUSTEST_H
#define SEARCHDBUSTEST_H
#include <QWidget>
class searchdbustest : public QWidget
{
Q_OBJECT
public:
explicit searchdbustest(QWidget *parent = Q_NULLPTR);
~searchdbustest() = default;
};
#endif // SEARCHDBUSTEST_H
Loading…
Cancel
Save