aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiorgos Tsiapaliwkas <terietor@gmail.com>2011-10-10 10:46:55 +0300
committerGiorgos Tsiapaliwkas <terietor@gmail.com>2011-10-10 10:46:55 +0300
commit96ee3243fc74eaff04fcd8b3c1bd96fe2ba9a238 (patch)
treee8d2fa6ac2a1a6e342fc3b6fb0fc0846d22225e9
parentadd 2 new class,qlistconverter and qpackageproperties (diff)
downloadc-portage-96ee3243fc74eaff04fcd8b3c1bd96fe2ba9a238.tar.gz
c-portage-96ee3243fc74eaff04fcd8b3c1bd96fe2ba9a238.tar.bz2
c-portage-96ee3243fc74eaff04fcd8b3c1bd96fe2ba9a238.zip
add a readme and a TODO
-rw-r--r--src/Qt/README3
-rw-r--r--src/Qt/TODO2
-rw-r--r--src/Qt/tests/CMakeLists.txt34
-rw-r--r--src/Qt/tests/qlistconverter_test.cpp16
-rw-r--r--src/Qt/tests/qpackageproperties_test.cpp32
-rw-r--r--src/Qt/tests/qportagesettings_test.cpp38
-rw-r--r--src/Qt/tests/test.cpp10
7 files changed, 135 insertions, 0 deletions
diff --git a/src/Qt/README b/src/Qt/README
new file mode 100644
index 0000000..3059917
--- /dev/null
+++ b/src/Qt/README
@@ -0,0 +1,3 @@
+Don't use this branch.It is only an interegation branch.
+The code is very unstable.I created this branch in order to
+avoid breaking the cmake_port branch.
diff --git a/src/Qt/TODO b/src/Qt/TODO
new file mode 100644
index 0000000..d11d08e
--- /dev/null
+++ b/src/Qt/TODO
@@ -0,0 +1,2 @@
+I need some help with the CMakeLists.txt which is located at
+c-portage/src/Qt/tests,in order to create some test files
diff --git a/src/Qt/tests/CMakeLists.txt b/src/Qt/tests/CMakeLists.txt
new file mode 100644
index 0000000..9c10387
--- /dev/null
+++ b/src/Qt/tests/CMakeLists.txt
@@ -0,0 +1,34 @@
+find_package(Qt4 REQUIRED)
+include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR})
+remove_definitions(-std=c99)
+
+set(cpp-portage-tests_SRCS qlistconverter_test.cpp qpackageproperties_test.cpp qportagesettings_test.cpp )
+
+add_executable(QtWrapperTest test.cpp)
+add_executable(QPackagepropertiesTest qpackageproperties_test.cpp)
+add_executable(QPortagesettingsTest qportagesettings_test.cpp)
+
+
+set(test_EXECS QtWrapperTest QPackagepropertiesTest QPortagesettingsTest)
+target_link_libraries(QtWrapperTest ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+target_link_libraries(QPackagepropertiesTest ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+target_link_libraries(QPortagesettingsTest ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+install(TARGETS QtWrapperTest QPackagepropertiesTest QPortagesettingsTest DESTINATION lib)
+
+
+
+#include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
+#remove_definitions(-std=c99)
+
+#set(cpp-portage_SRCS qportagesettings.cpp)
+#set(cpp-portage_HDRS qportagesettings.h)
+
+#QT4_WRAP_CPP(cpp-portage_MOC_SRCS ${cpp-portage_HDRS})
+
+#add_library(cpp-portage qportagesettings.cpp ${cpp-portage_MOC_SRCS})
+
+#install(TARGETS cpp-portage DESTINATION lib)
+#install(FILES ${cpp-portage_HDRS} DESTINATION include/cpp-portage)
+
+#add_subdirectory(tests) \ No newline at end of file
diff --git a/src/Qt/tests/qlistconverter_test.cpp b/src/Qt/tests/qlistconverter_test.cpp
new file mode 100644
index 0000000..622b84b
--- /dev/null
+++ b/src/Qt/tests/qlistconverter_test.cpp
@@ -0,0 +1,16 @@
+#include <QApplication>
+#include <QDebug>
+
+#include "../qportagesettings.h"
+
+void test() {
+ qDebug() <<
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app;
+
+
+ return app.exec();
+}
diff --git a/src/Qt/tests/qpackageproperties_test.cpp b/src/Qt/tests/qpackageproperties_test.cpp
new file mode 100644
index 0000000..efde5e7
--- /dev/null
+++ b/src/Qt/tests/qpackageproperties_test.cpp
@@ -0,0 +1,32 @@
+#include <QApplication>
+#include <QDebug>
+
+#include "../qpackageproperties.h"
+#include "../qpackageproperties.cpp"
+#include "../qlistconverter.h"
+#include "../qlistconverter.cpp"
+#include <QStringList>
+namespace CppPortage {
+class QPackageProperties;
+}
+
+using namespace CppPortage;
+
+void test();
+
+void test() {
+
+ QPackageProperties packPro(QString("slot"),QStringList("keyw"),QStringList("home"),QStringList("flags"));
+
+ qDebug() << "QString Slot()" << packPro.Slot();
+ qDebug() << "QStringList Homepages()" << packPro.Homepages();
+ qDebug() << "QStringList Flags()" << packPro.Flags();
+ qDebug() << "QStringList Keywords" << packPro.Keywords();
+}
+
+int main(int argc, char *argv[])
+{
+ test();
+ QApplication app(argc, argv);
+ return app.exec();
+} \ No newline at end of file
diff --git a/src/Qt/tests/qportagesettings_test.cpp b/src/Qt/tests/qportagesettings_test.cpp
new file mode 100644
index 0000000..ba24df7
--- /dev/null
+++ b/src/Qt/tests/qportagesettings_test.cpp
@@ -0,0 +1,38 @@
+#include <QApplication>
+#include <QDebug>
+#include <QStringList>
+#include "../qportagesettings.h"
+#include "../qportagesettings.cpp"
+#include "../qlistconverter.h"
+#include "../qlistconverter.cpp"
+namespace CppPortage {
+ class QPortageSettings;
+}
+
+using namespace CppPortage;
+
+void test() {
+ QPortageSettings portSett;
+
+ qDebug() << "int resetUseFlags()" << portSett.resetUseFlags();
+ qDebug() << "int reset()" << portSett.reset();
+ qDebug() << "int reloadConfig()" << portSett.reloadConfig();
+ qDebug() << "int reloadWorld()" << portSett.reloadWorld();
+ qDebug() << "QStringList world()" << portSett.world();
+ qDebug() << "QStringList archList()" << portSett.archList();
+ qDebug() << "QStringList virtuals()" << portSett.virtuals();
+ qDebug() << "QString acceptKeywords()" << portSett.acceptKeywords();
+ qDebug() << "QStringList systemUseFlags()" << portSett.systemUseFlags();
+ qDebug() << "QString arch()" << portSett.arch();
+ qDebug() << "QString portdir()" << portSett.portdir();
+ qDebug() << "QString portdirOverlay()" << portSett.portdirOverlay();
+ qDebug() << "QString userConfigDir()" << portSett.userConfigDir();
+}
+
+int main(int argc, char *argv[])
+{
+ test();
+ QApplication app(argc, argv);
+
+ return app.exec();
+}
diff --git a/src/Qt/tests/test.cpp b/src/Qt/tests/test.cpp
new file mode 100644
index 0000000..c8329b1
--- /dev/null
+++ b/src/Qt/tests/test.cpp
@@ -0,0 +1,10 @@
+#include <QApplication>
+#include <QDebug>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc,argv);
+
+
+ return app.exec();
+}