From 2cf3ef8675698a319fd3d258d4f4d32e3d7b61fa Mon Sep 17 00:00:00 2001 From: Anselme Date: Fri, 29 May 2015 23:08:04 +0200 Subject: [PATCH] changed the structure of the project --- SparrowBot.pro | 49 ++++++++++++------------- app/app.pro | 12 ++++++ main.cpp => app/main.cpp | 0 basemodule.cpp => ircbot/basemodule.cpp | 0 basemodule.h => ircbot/basemodule.h | 0 botapp.cpp => ircbot/botapp.cpp | 0 botapp.h => ircbot/botapp.h | 0 ircbot.cpp => ircbot/ircbot.cpp | 0 ircbot.h => ircbot/ircbot.h | 0 ircbot/ircbot.pro | 26 +++++++++++++ mainwindow.cpp => ircbot/mainwindow.cpp | 0 mainwindow.h => ircbot/mainwindow.h | 0 mainwindow.ui => ircbot/mainwindow.ui | 0 message.cpp => ircbot/message.cpp | 0 message.h => ircbot/message.h | 0 module.cpp => ircbot/module.cpp | 0 module.h => ircbot/module.h | 0 prompt.cpp => ircbot/prompt.cpp | 0 prompt.h => ircbot/prompt.h | 0 socketirc.cpp => ircbot/socketirc.cpp | 0 socketirc.h => ircbot/socketirc.h | 0 user.cpp => ircbot/user.cpp | 0 user.h => ircbot/user.h | 0 23 files changed, 61 insertions(+), 26 deletions(-) create mode 100644 app/app.pro rename main.cpp => app/main.cpp (100%) rename basemodule.cpp => ircbot/basemodule.cpp (100%) rename basemodule.h => ircbot/basemodule.h (100%) rename botapp.cpp => ircbot/botapp.cpp (100%) rename botapp.h => ircbot/botapp.h (100%) rename ircbot.cpp => ircbot/ircbot.cpp (100%) rename ircbot.h => ircbot/ircbot.h (100%) create mode 100644 ircbot/ircbot.pro rename mainwindow.cpp => ircbot/mainwindow.cpp (100%) rename mainwindow.h => ircbot/mainwindow.h (100%) rename mainwindow.ui => ircbot/mainwindow.ui (100%) rename message.cpp => ircbot/message.cpp (100%) rename message.h => ircbot/message.h (100%) rename module.cpp => ircbot/module.cpp (100%) rename module.h => ircbot/module.h (100%) rename prompt.cpp => ircbot/prompt.cpp (100%) rename prompt.h => ircbot/prompt.h (100%) rename socketirc.cpp => ircbot/socketirc.cpp (100%) rename socketirc.h => ircbot/socketirc.h (100%) rename user.cpp => ircbot/user.cpp (100%) rename user.h => ircbot/user.h (100%) diff --git a/SparrowBot.pro b/SparrowBot.pro index 98f9b11..20580b7 100644 --- a/SparrowBot.pro +++ b/SparrowBot.pro @@ -1,34 +1,31 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2015-05-13T11:07:00 -# -#------------------------------------------------- - QT += core gui network widgets -TARGET = SparrowBot -TEMPLATE = app -CONFIG += c++11 +TEMPLATE = subdirs +CONFIG += ordered c++11 +SUBDIRS = ircbot \ + app + +app.depends = ircbot SOURCES += mainwindow.cpp \ - socketirc.cpp \ - message.cpp \ - user.cpp \ - prompt.cpp \ - ircbot.cpp \ - botapp.cpp \ - module.cpp \ - basemodule.cpp \ - main.cpp + socketirc.cpp \ + message.cpp \ + user.cpp \ + prompt.cpp \ + ircbot.cpp \ + botapp.cpp \ + module.cpp \ + basemodule.cpp \ + main.cpp HEADERS += mainwindow.h \ - socketirc.h \ - message.h \ - user.h \ - prompt.h \ - ircbot.h \ - botapp.h \ - module.h \ - basemodule.h + socketirc.h \ + message.h \ + user.h \ + prompt.h \ + ircbot.h \ + botapp.h \ + module.h \ + basemodule.h FORMS += mainwindow.ui diff --git a/app/app.pro b/app/app.pro new file mode 100644 index 0000000..6b2b873 --- /dev/null +++ b/app/app.pro @@ -0,0 +1,12 @@ +QT += core gui network widgets + +TARGET = ../../SparrowBot +TEMPLATE = app +CONFIG += c++11 + +debug:LIBS += ../ircbot/debug/libircbot.a +release:LIBS += ../ircbot/release/libircbot.a + +INCLUDEPATH += ../ircbot + +SOURCES = main.cpp diff --git a/main.cpp b/app/main.cpp similarity index 100% rename from main.cpp rename to app/main.cpp diff --git a/basemodule.cpp b/ircbot/basemodule.cpp similarity index 100% rename from basemodule.cpp rename to ircbot/basemodule.cpp diff --git a/basemodule.h b/ircbot/basemodule.h similarity index 100% rename from basemodule.h rename to ircbot/basemodule.h diff --git a/botapp.cpp b/ircbot/botapp.cpp similarity index 100% rename from botapp.cpp rename to ircbot/botapp.cpp diff --git a/botapp.h b/ircbot/botapp.h similarity index 100% rename from botapp.h rename to ircbot/botapp.h diff --git a/ircbot.cpp b/ircbot/ircbot.cpp similarity index 100% rename from ircbot.cpp rename to ircbot/ircbot.cpp diff --git a/ircbot.h b/ircbot/ircbot.h similarity index 100% rename from ircbot.h rename to ircbot/ircbot.h diff --git a/ircbot/ircbot.pro b/ircbot/ircbot.pro new file mode 100644 index 0000000..ccd215f --- /dev/null +++ b/ircbot/ircbot.pro @@ -0,0 +1,26 @@ +QT += core gui network widgets + +TEMPLATE = lib +CONFIG += staticlib c++11 + +SOURCES += mainwindow.cpp \ + socketirc.cpp \ + message.cpp \ + user.cpp \ + prompt.cpp \ + ircbot.cpp \ + botapp.cpp \ + module.cpp \ + basemodule.cpp + +HEADERS += mainwindow.h \ + socketirc.h \ + message.h \ + user.h \ + prompt.h \ + ircbot.h \ + botapp.h \ + module.h \ + basemodule.h + +FORMS += mainwindow.ui diff --git a/mainwindow.cpp b/ircbot/mainwindow.cpp similarity index 100% rename from mainwindow.cpp rename to ircbot/mainwindow.cpp diff --git a/mainwindow.h b/ircbot/mainwindow.h similarity index 100% rename from mainwindow.h rename to ircbot/mainwindow.h diff --git a/mainwindow.ui b/ircbot/mainwindow.ui similarity index 100% rename from mainwindow.ui rename to ircbot/mainwindow.ui diff --git a/message.cpp b/ircbot/message.cpp similarity index 100% rename from message.cpp rename to ircbot/message.cpp diff --git a/message.h b/ircbot/message.h similarity index 100% rename from message.h rename to ircbot/message.h diff --git a/module.cpp b/ircbot/module.cpp similarity index 100% rename from module.cpp rename to ircbot/module.cpp diff --git a/module.h b/ircbot/module.h similarity index 100% rename from module.h rename to ircbot/module.h diff --git a/prompt.cpp b/ircbot/prompt.cpp similarity index 100% rename from prompt.cpp rename to ircbot/prompt.cpp diff --git a/prompt.h b/ircbot/prompt.h similarity index 100% rename from prompt.h rename to ircbot/prompt.h diff --git a/socketirc.cpp b/ircbot/socketirc.cpp similarity index 100% rename from socketirc.cpp rename to ircbot/socketirc.cpp diff --git a/socketirc.h b/ircbot/socketirc.h similarity index 100% rename from socketirc.h rename to ircbot/socketirc.h diff --git a/user.cpp b/ircbot/user.cpp similarity index 100% rename from user.cpp rename to ircbot/user.cpp diff --git a/user.h b/ircbot/user.h similarity index 100% rename from user.h rename to ircbot/user.h