diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0dcfbb3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,110 @@ +cmake_minimum_required(VERSION 3.1.0) +project(pglaball) + +#include(CheckCXXCompilerFlag) +find_package(PkgConfig REQUIRED) + + +# Check for standard to use +#set(CMAKE_CXX_STANDARD 14) + +include(CheckCXXCompilerFlag) + +# Check for standard to use +check_cxx_compiler_flag(-std=c++17 HAVE_FLAG_STD_CXX17) +if(HAVE_FLAG_STD_CXX17) + # Have -std=c++17, use it + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") +else() + check_cxx_compiler_flag(-std=c++1z HAVE_FLAG_STD_CXX1Z) + if(HAVE_FLAG_STD_CXX1Z) + # Have -std=c++1z, use it + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z") + else() + # And so on and on... + endif() +endif() + +add_compile_options( -Wall -fpic -march=native ) +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og") + +# Find includes in corresponding build directories +set(CMAKE_INCLUDE_CURRENT_DIR ON) +# Instruct CMake to run moc automatically when needed. +set(CMAKE_AUTOMOC ON) + +pkg_check_modules(Botan REQUIRED botan-2) +include_directories( ${Botan_INCLUDE_DIRS} ) +pkg_check_modules(Pq REQUIRED libpq) +include_directories( ${Pq_INCLUDE_DIRS} ) + +find_package(Qt5Widgets 5.7 REQUIRED) +include_directories( ${Qt5Widgets_INCLUDE_DIRS} ) + +find_package(fmt 4.0 REQUIRED) +include_directories( ${fmt_INCLUDE_DIRS} ) + +#find_package(Boost 1.62 REQUIRED) # COMPONENTS program_options REQUIRED ) +#include_directories( ${Boost_INCLUDE_DIRS} ) + +add_library(core STATIC + core/BackupFormatModel.cpp + core/CsvWriter.cpp + core/my_boost_assert_handler.cpp + core/PasswordManager.cpp + core/SqlLexer.cpp) + +add_executable(pglab + pglab/ASyncDBConnection.cpp + pglab/ASyncWindow.cpp + pglab/BackupDialog.cpp + pglab/BackupRestore.cpp + pglab/ConnectionConfig.cpp + pglab/ConnectionList.cpp + pglab/ConnectionListModel.cpp + pglab/ConnectionManagerWindow.cpp + pglab/DatabaseInspectorWidget.cpp + pglab/DatabasesTableModel.cpp + pglab/DatabaseWindow.cpp + pglab/ExplainTreeModelItem.cpp + pglab/jsoncpp.cpp + pglab/main.cpp + pglab/MainWindow.cpp + pglab/MasterController.cpp + pglab/OpenDatabase.cpp + pglab/ParamListModel.cpp + pglab/ParamTypeDelegate.cpp + pglab/PgAuthIdContainer.cpp + pglab/PgAuthId.cpp + pglab/PgClass.cpp + pglab/PgDatabaseContainer.cpp + pglab/PgDatabase.cpp + pglab/PgNamespace.cpp + pglab/PgsqlConn.cpp + pglab/PgsqlDatabaseCatalogue.cpp + pglab/Pgsql_Params.cpp + pglab/Pgsql_Result.cpp + pglab/Pgsql_Row.cpp + pglab/Pgsql_Value.cpp + pglab/PgTypeContainer.cpp + pglab/PgType.cpp + pglab/ProcessStdioWidget.cpp + pglab/QueryExplainModel.cpp + pglab/QueryResultModel.cpp + pglab/QueryTab.cpp + pglab/RolesTableModel.cpp + pglab/ServerWindow.cpp + pglab/sqlhighlighter.cpp + pglab/sqlparser.cpp + pglab/SqlSyntaxHighlighter.cpp + pglab/stopwatch.cpp + pglab/tsqueue.cpp + pglab/tuplesresultwidget.cpp + pglab/typeselectionitemmodel.cpp + pglab/util.cpp + pglab/waithandlelist.cpp + pglab/win32event.cpp + ) +target_include_directories(pglab PUBLIC + ./core + ) diff --git a/core/Core.cpp b/core/Core.cpp deleted file mode 100644 index dd60b7d..0000000 --- a/core/Core.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "Core.h" - - -Core::Core() -{ -} diff --git a/core/Core.h b/core/Core.h deleted file mode 100644 index 6ecb6d3..0000000 --- a/core/Core.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CORE_H -#define CORE_H - - -class Core -{ - -public: - Core(); -}; - -#endif // CORE_H diff --git a/core/CsvWriter.cpp b/core/CsvWriter.cpp index a2bb973..b51ace3 100644 --- a/core/CsvWriter.cpp +++ b/core/CsvWriter.cpp @@ -1,4 +1,4 @@ -#include "csvwriter.h" +#include "CsvWriter.h" CsvWriter::CsvWriter() {} diff --git a/core/PasswordManager.cpp b/core/PasswordManager.cpp index 597e7c9..60ca821 100644 --- a/core/PasswordManager.cpp +++ b/core/PasswordManager.cpp @@ -13,7 +13,6 @@ #include -#include "Core.h" using namespace Botan; diff --git a/core/core.pro b/core/core.pro deleted file mode 100644 index 52efebe..0000000 --- a/core/core.pro +++ /dev/null @@ -1,45 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2017-02-26T10:51:14 -# -#------------------------------------------------- - -QT -= gui - -TARGET = core -TEMPLATE = lib -CONFIG += staticlib c++14 - -INCLUDEPATH += C:\prog\include C:\VSproj\boost_1_63_0 -DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX -#LIBS += /LIBPATH:C:\VSproj\boost_1_63_0\stage\lib /LIBPATH:c:\prog\lib\ libpq.lib fmt.lib User32.lib ws2_32.lib - - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which as been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += Core.cpp \ - my_boost_assert_handler.cpp \ - SqlLexer.cpp \ - PasswordManager.cpp \ - CsvWriter.cpp \ - BackupFormatModel.cpp - -HEADERS += Core.h \ - PasswordManager.h \ - SqlLexer.h \ - ScopeGuard.h \ - CsvWriter.h \ - BackupFormatModel.h -unix { - target.path = /usr/lib - INSTALLS += target -} diff --git a/src/.gitignore b/pglab/.gitignore similarity index 100% rename from src/.gitignore rename to pglab/.gitignore diff --git a/src/ASyncDBConnection.cpp b/pglab/ASyncDBConnection.cpp similarity index 99% rename from src/ASyncDBConnection.cpp rename to pglab/ASyncDBConnection.cpp index 95fa5f5..eb4387b 100644 --- a/src/ASyncDBConnection.cpp +++ b/pglab/ASyncDBConnection.cpp @@ -1,6 +1,6 @@ -#include "asyncdbconnection.h" +#include "ASyncDBConnection.h" #include "waithandlelist.h" -#include "scopeguard.h" +#include "ScopeGuard.h" #include ASyncDBConnection::ASyncDBConnection() diff --git a/src/ASyncDBConnection.h b/pglab/ASyncDBConnection.h similarity index 99% rename from src/ASyncDBConnection.h rename to pglab/ASyncDBConnection.h index 07bb1bf..033beb5 100644 --- a/src/ASyncDBConnection.h +++ b/pglab/ASyncDBConnection.h @@ -4,7 +4,7 @@ #include "PgsqlConn.h" #include "Pgsql_Params.h" #include "win32event.h" -#include "connectionconfig.h" +#include "ConnectionConfig.h" #include #include #include diff --git a/src/ASyncWindow.cpp b/pglab/ASyncWindow.cpp similarity index 100% rename from src/ASyncWindow.cpp rename to pglab/ASyncWindow.cpp diff --git a/src/ASyncWindow.h b/pglab/ASyncWindow.h similarity index 100% rename from src/ASyncWindow.h rename to pglab/ASyncWindow.h diff --git a/src/BackupDialog.cpp b/pglab/BackupDialog.cpp similarity index 100% rename from src/BackupDialog.cpp rename to pglab/BackupDialog.cpp diff --git a/src/BackupDialog.h b/pglab/BackupDialog.h similarity index 100% rename from src/BackupDialog.h rename to pglab/BackupDialog.h diff --git a/src/BackupDialog.ui b/pglab/BackupDialog.ui similarity index 100% rename from src/BackupDialog.ui rename to pglab/BackupDialog.ui diff --git a/src/BackupRestore.cpp b/pglab/BackupRestore.cpp similarity index 100% rename from src/BackupRestore.cpp rename to pglab/BackupRestore.cpp diff --git a/src/ConnectionConfig.cpp b/pglab/ConnectionConfig.cpp similarity index 100% rename from src/ConnectionConfig.cpp rename to pglab/ConnectionConfig.cpp diff --git a/src/ConnectionConfig.h b/pglab/ConnectionConfig.h similarity index 100% rename from src/ConnectionConfig.h rename to pglab/ConnectionConfig.h diff --git a/src/ConnectionList.cpp b/pglab/ConnectionList.cpp similarity index 100% rename from src/ConnectionList.cpp rename to pglab/ConnectionList.cpp diff --git a/src/ConnectionList.h b/pglab/ConnectionList.h similarity index 100% rename from src/ConnectionList.h rename to pglab/ConnectionList.h diff --git a/src/ConnectionListModel.cpp b/pglab/ConnectionListModel.cpp similarity index 100% rename from src/ConnectionListModel.cpp rename to pglab/ConnectionListModel.cpp diff --git a/src/ConnectionListModel.h b/pglab/ConnectionListModel.h similarity index 100% rename from src/ConnectionListModel.h rename to pglab/ConnectionListModel.h diff --git a/src/ConnectionManagerWindow.cpp b/pglab/ConnectionManagerWindow.cpp similarity index 100% rename from src/ConnectionManagerWindow.cpp rename to pglab/ConnectionManagerWindow.cpp diff --git a/src/ConnectionManagerWindow.h b/pglab/ConnectionManagerWindow.h similarity index 100% rename from src/ConnectionManagerWindow.h rename to pglab/ConnectionManagerWindow.h diff --git a/src/ConnectionManagerWindow.ui b/pglab/ConnectionManagerWindow.ui similarity index 100% rename from src/ConnectionManagerWindow.ui rename to pglab/ConnectionManagerWindow.ui diff --git a/src/DatabaseInspectorWidget.cpp b/pglab/DatabaseInspectorWidget.cpp similarity index 100% rename from src/DatabaseInspectorWidget.cpp rename to pglab/DatabaseInspectorWidget.cpp diff --git a/src/DatabaseInspectorWidget.h b/pglab/DatabaseInspectorWidget.h similarity index 100% rename from src/DatabaseInspectorWidget.h rename to pglab/DatabaseInspectorWidget.h diff --git a/src/DatabaseInspectorWidget.ui b/pglab/DatabaseInspectorWidget.ui similarity index 100% rename from src/DatabaseInspectorWidget.ui rename to pglab/DatabaseInspectorWidget.ui diff --git a/src/DatabaseWindow.cpp b/pglab/DatabaseWindow.cpp similarity index 100% rename from src/DatabaseWindow.cpp rename to pglab/DatabaseWindow.cpp diff --git a/src/DatabaseWindow.h b/pglab/DatabaseWindow.h similarity index 100% rename from src/DatabaseWindow.h rename to pglab/DatabaseWindow.h diff --git a/src/DatabaseWindow.ui b/pglab/DatabaseWindow.ui similarity index 100% rename from src/DatabaseWindow.ui rename to pglab/DatabaseWindow.ui diff --git a/src/DatabasesTableModel.cpp b/pglab/DatabasesTableModel.cpp similarity index 100% rename from src/DatabasesTableModel.cpp rename to pglab/DatabasesTableModel.cpp diff --git a/src/DatabasesTableModel.h b/pglab/DatabasesTableModel.h similarity index 100% rename from src/DatabasesTableModel.h rename to pglab/DatabasesTableModel.h diff --git a/src/Doxyfile b/pglab/Doxyfile similarity index 100% rename from src/Doxyfile rename to pglab/Doxyfile diff --git a/src/ExplainTreeModelItem.cpp b/pglab/ExplainTreeModelItem.cpp similarity index 100% rename from src/ExplainTreeModelItem.cpp rename to pglab/ExplainTreeModelItem.cpp diff --git a/src/ExplainTreeModelItem.h b/pglab/ExplainTreeModelItem.h similarity index 100% rename from src/ExplainTreeModelItem.h rename to pglab/ExplainTreeModelItem.h diff --git a/src/MainWindow.cpp b/pglab/MainWindow.cpp similarity index 100% rename from src/MainWindow.cpp rename to pglab/MainWindow.cpp diff --git a/src/MainWindow.h b/pglab/MainWindow.h similarity index 100% rename from src/MainWindow.h rename to pglab/MainWindow.h diff --git a/src/MainWindow.ui b/pglab/MainWindow.ui similarity index 100% rename from src/MainWindow.ui rename to pglab/MainWindow.ui diff --git a/src/MasterController.cpp b/pglab/MasterController.cpp similarity index 100% rename from src/MasterController.cpp rename to pglab/MasterController.cpp diff --git a/src/MasterController.h b/pglab/MasterController.h similarity index 100% rename from src/MasterController.h rename to pglab/MasterController.h diff --git a/src/OpenDatabase.cpp b/pglab/OpenDatabase.cpp similarity index 100% rename from src/OpenDatabase.cpp rename to pglab/OpenDatabase.cpp diff --git a/src/OpenDatabase.h b/pglab/OpenDatabase.h similarity index 100% rename from src/OpenDatabase.h rename to pglab/OpenDatabase.h diff --git a/src/ParamListModel.cpp b/pglab/ParamListModel.cpp similarity index 100% rename from src/ParamListModel.cpp rename to pglab/ParamListModel.cpp diff --git a/src/ParamListModel.h b/pglab/ParamListModel.h similarity index 100% rename from src/ParamListModel.h rename to pglab/ParamListModel.h diff --git a/src/ParamTypeDelegate.cpp b/pglab/ParamTypeDelegate.cpp similarity index 100% rename from src/ParamTypeDelegate.cpp rename to pglab/ParamTypeDelegate.cpp diff --git a/src/ParamTypeDelegate.h b/pglab/ParamTypeDelegate.h similarity index 100% rename from src/ParamTypeDelegate.h rename to pglab/ParamTypeDelegate.h diff --git a/src/PgAuthId.cpp b/pglab/PgAuthId.cpp similarity index 100% rename from src/PgAuthId.cpp rename to pglab/PgAuthId.cpp diff --git a/src/PgAuthId.h b/pglab/PgAuthId.h similarity index 100% rename from src/PgAuthId.h rename to pglab/PgAuthId.h diff --git a/src/PgAuthIdContainer.cpp b/pglab/PgAuthIdContainer.cpp similarity index 100% rename from src/PgAuthIdContainer.cpp rename to pglab/PgAuthIdContainer.cpp diff --git a/src/PgAuthIdContainer.h b/pglab/PgAuthIdContainer.h similarity index 100% rename from src/PgAuthIdContainer.h rename to pglab/PgAuthIdContainer.h diff --git a/src/PgClass.cpp b/pglab/PgClass.cpp similarity index 100% rename from src/PgClass.cpp rename to pglab/PgClass.cpp diff --git a/src/PgClass.h b/pglab/PgClass.h similarity index 100% rename from src/PgClass.h rename to pglab/PgClass.h diff --git a/src/PgContainer.h b/pglab/PgContainer.h similarity index 100% rename from src/PgContainer.h rename to pglab/PgContainer.h diff --git a/src/PgDatabase.cpp b/pglab/PgDatabase.cpp similarity index 100% rename from src/PgDatabase.cpp rename to pglab/PgDatabase.cpp diff --git a/src/PgDatabase.h b/pglab/PgDatabase.h similarity index 100% rename from src/PgDatabase.h rename to pglab/PgDatabase.h diff --git a/src/PgDatabaseContainer.cpp b/pglab/PgDatabaseContainer.cpp similarity index 100% rename from src/PgDatabaseContainer.cpp rename to pglab/PgDatabaseContainer.cpp diff --git a/src/PgDatabaseContainer.h b/pglab/PgDatabaseContainer.h similarity index 100% rename from src/PgDatabaseContainer.h rename to pglab/PgDatabaseContainer.h diff --git a/src/PgNamespace.cpp b/pglab/PgNamespace.cpp similarity index 100% rename from src/PgNamespace.cpp rename to pglab/PgNamespace.cpp diff --git a/src/PgNamespace.h b/pglab/PgNamespace.h similarity index 100% rename from src/PgNamespace.h rename to pglab/PgNamespace.h diff --git a/src/PgType.cpp b/pglab/PgType.cpp similarity index 100% rename from src/PgType.cpp rename to pglab/PgType.cpp diff --git a/src/PgType.h b/pglab/PgType.h similarity index 100% rename from src/PgType.h rename to pglab/PgType.h diff --git a/src/PgTypeContainer.cpp b/pglab/PgTypeContainer.cpp similarity index 100% rename from src/PgTypeContainer.cpp rename to pglab/PgTypeContainer.cpp diff --git a/src/PgTypeContainer.h b/pglab/PgTypeContainer.h similarity index 100% rename from src/PgTypeContainer.h rename to pglab/PgTypeContainer.h diff --git a/src/PgsqlConn.cpp b/pglab/PgsqlConn.cpp similarity index 100% rename from src/PgsqlConn.cpp rename to pglab/PgsqlConn.cpp diff --git a/src/PgsqlConn.h b/pglab/PgsqlConn.h similarity index 99% rename from src/PgsqlConn.h rename to pglab/PgsqlConn.h index 80654c7..74dbf1c 100644 --- a/src/PgsqlConn.h +++ b/pglab/PgsqlConn.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include diff --git a/src/PgsqlDatabaseCatalogue.cpp b/pglab/PgsqlDatabaseCatalogue.cpp similarity index 100% rename from src/PgsqlDatabaseCatalogue.cpp rename to pglab/PgsqlDatabaseCatalogue.cpp diff --git a/src/PgsqlDatabaseCatalogue.h b/pglab/PgsqlDatabaseCatalogue.h similarity index 100% rename from src/PgsqlDatabaseCatalogue.h rename to pglab/PgsqlDatabaseCatalogue.h diff --git a/src/Pgsql_Params.cpp b/pglab/Pgsql_Params.cpp similarity index 100% rename from src/Pgsql_Params.cpp rename to pglab/Pgsql_Params.cpp diff --git a/src/Pgsql_Params.h b/pglab/Pgsql_Params.h similarity index 98% rename from src/Pgsql_Params.h rename to pglab/Pgsql_Params.h index 7e10e88..a9e9950 100644 --- a/src/Pgsql_Params.h +++ b/pglab/Pgsql_Params.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include "Pgsql_declare.h" namespace Pgsql { diff --git a/src/Pgsql_Result.cpp b/pglab/Pgsql_Result.cpp similarity index 100% rename from src/Pgsql_Result.cpp rename to pglab/Pgsql_Result.cpp diff --git a/src/Pgsql_Result.h b/pglab/Pgsql_Result.h similarity index 100% rename from src/Pgsql_Result.h rename to pglab/Pgsql_Result.h diff --git a/src/Pgsql_Row.cpp b/pglab/Pgsql_Row.cpp similarity index 100% rename from src/Pgsql_Row.cpp rename to pglab/Pgsql_Row.cpp diff --git a/src/Pgsql_Row.h b/pglab/Pgsql_Row.h similarity index 100% rename from src/Pgsql_Row.h rename to pglab/Pgsql_Row.h diff --git a/src/Pgsql_Value.cpp b/pglab/Pgsql_Value.cpp similarity index 100% rename from src/Pgsql_Value.cpp rename to pglab/Pgsql_Value.cpp diff --git a/src/Pgsql_Value.h b/pglab/Pgsql_Value.h similarity index 97% rename from src/Pgsql_Value.h rename to pglab/Pgsql_Value.h index 2eec654..30da472 100644 --- a/src/Pgsql_Value.h +++ b/pglab/Pgsql_Value.h @@ -21,7 +21,7 @@ namespace Pgsql { operator short() const; operator int() const; operator Oid() const; - operator __int64() const; + operator long long() const; operator bool() const; private: const char *m_val; diff --git a/src/Pgsql_declare.h b/pglab/Pgsql_declare.h similarity index 94% rename from src/Pgsql_declare.h rename to pglab/Pgsql_declare.h index 9454641..279d09b 100644 --- a/src/Pgsql_declare.h +++ b/pglab/Pgsql_declare.h @@ -1,7 +1,7 @@ #ifndef PGSQL_DECLARE_H #define PGSQL_DECLARE_H -#include +#include namespace Pgsql { diff --git a/src/ProcessStdioWidget.cpp b/pglab/ProcessStdioWidget.cpp similarity index 100% rename from src/ProcessStdioWidget.cpp rename to pglab/ProcessStdioWidget.cpp diff --git a/src/ProcessStdioWidget.h b/pglab/ProcessStdioWidget.h similarity index 100% rename from src/ProcessStdioWidget.h rename to pglab/ProcessStdioWidget.h diff --git a/src/ProcessStdioWidget.ui b/pglab/ProcessStdioWidget.ui similarity index 100% rename from src/ProcessStdioWidget.ui rename to pglab/ProcessStdioWidget.ui diff --git a/src/QueryExplainModel.cpp b/pglab/QueryExplainModel.cpp similarity index 100% rename from src/QueryExplainModel.cpp rename to pglab/QueryExplainModel.cpp diff --git a/src/QueryExplainModel.h b/pglab/QueryExplainModel.h similarity index 100% rename from src/QueryExplainModel.h rename to pglab/QueryExplainModel.h diff --git a/src/QueryResultModel.cpp b/pglab/QueryResultModel.cpp similarity index 100% rename from src/QueryResultModel.cpp rename to pglab/QueryResultModel.cpp diff --git a/src/QueryResultModel.h b/pglab/QueryResultModel.h similarity index 100% rename from src/QueryResultModel.h rename to pglab/QueryResultModel.h diff --git a/src/QueryTab.cpp b/pglab/QueryTab.cpp similarity index 100% rename from src/QueryTab.cpp rename to pglab/QueryTab.cpp diff --git a/src/QueryTab.h b/pglab/QueryTab.h similarity index 100% rename from src/QueryTab.h rename to pglab/QueryTab.h diff --git a/src/QueryTab.ui b/pglab/QueryTab.ui similarity index 100% rename from src/QueryTab.ui rename to pglab/QueryTab.ui diff --git a/src/RolesTableModel.cpp b/pglab/RolesTableModel.cpp similarity index 100% rename from src/RolesTableModel.cpp rename to pglab/RolesTableModel.cpp diff --git a/src/RolesTableModel.h b/pglab/RolesTableModel.h similarity index 100% rename from src/RolesTableModel.h rename to pglab/RolesTableModel.h diff --git a/src/ServerWindow.cpp b/pglab/ServerWindow.cpp similarity index 100% rename from src/ServerWindow.cpp rename to pglab/ServerWindow.cpp diff --git a/src/ServerWindow.h b/pglab/ServerWindow.h similarity index 100% rename from src/ServerWindow.h rename to pglab/ServerWindow.h diff --git a/src/ServerWindow.ui b/pglab/ServerWindow.ui similarity index 100% rename from src/ServerWindow.ui rename to pglab/ServerWindow.ui diff --git a/src/SqlSyntaxHighlighter.cpp b/pglab/SqlSyntaxHighlighter.cpp similarity index 100% rename from src/SqlSyntaxHighlighter.cpp rename to pglab/SqlSyntaxHighlighter.cpp diff --git a/src/SqlSyntaxHighlighter.h b/pglab/SqlSyntaxHighlighter.h similarity index 100% rename from src/SqlSyntaxHighlighter.h rename to pglab/SqlSyntaxHighlighter.h diff --git a/src/icons/16x16/document_green.png b/pglab/icons/16x16/document_green.png similarity index 100% rename from src/icons/16x16/document_green.png rename to pglab/icons/16x16/document_green.png diff --git a/src/icons/16x16/document_red.png b/pglab/icons/16x16/document_red.png similarity index 100% rename from src/icons/16x16/document_red.png rename to pglab/icons/16x16/document_red.png diff --git a/src/icons/16x16/document_yellow.png b/pglab/icons/16x16/document_yellow.png similarity index 100% rename from src/icons/16x16/document_yellow.png rename to pglab/icons/16x16/document_yellow.png diff --git a/src/icons/backups.png b/pglab/icons/backups.png similarity index 100% rename from src/icons/backups.png rename to pglab/icons/backups.png diff --git a/src/icons/desktop.ini b/pglab/icons/desktop.ini similarity index 100% rename from src/icons/desktop.ini rename to pglab/icons/desktop.ini diff --git a/src/icons/folder.png b/pglab/icons/folder.png similarity index 100% rename from src/icons/folder.png rename to pglab/icons/folder.png diff --git a/src/icons/information.png b/pglab/icons/information.png similarity index 100% rename from src/icons/information.png rename to pglab/icons/information.png diff --git a/src/icons/lightbulb.png b/pglab/icons/lightbulb.png similarity index 100% rename from src/icons/lightbulb.png rename to pglab/icons/lightbulb.png diff --git a/src/icons/lightbulb_off.png b/pglab/icons/lightbulb_off.png similarity index 100% rename from src/icons/lightbulb_off.png rename to pglab/icons/lightbulb_off.png diff --git a/src/icons/page_white_add.png b/pglab/icons/page_white_add.png similarity index 100% rename from src/icons/page_white_add.png rename to pglab/icons/page_white_add.png diff --git a/src/icons/page_white_copy.png b/pglab/icons/page_white_copy.png similarity index 100% rename from src/icons/page_white_copy.png rename to pglab/icons/page_white_copy.png diff --git a/src/icons/page_white_delete.png b/pglab/icons/page_white_delete.png similarity index 100% rename from src/icons/page_white_delete.png rename to pglab/icons/page_white_delete.png diff --git a/src/icons/script_delete.png b/pglab/icons/script_delete.png similarity index 100% rename from src/icons/script_delete.png rename to pglab/icons/script_delete.png diff --git a/src/icons/script_go.png b/pglab/icons/script_go.png similarity index 100% rename from src/icons/script_go.png rename to pglab/icons/script_go.png diff --git a/src/icons/script_save.png b/pglab/icons/script_save.png similarity index 100% rename from src/icons/script_save.png rename to pglab/icons/script_save.png diff --git a/src/icons/server_add.png b/pglab/icons/server_add.png similarity index 100% rename from src/icons/server_add.png rename to pglab/icons/server_add.png diff --git a/src/icons/server_delete.png b/pglab/icons/server_delete.png similarity index 100% rename from src/icons/server_delete.png rename to pglab/icons/server_delete.png diff --git a/src/icons/server_edit.png b/pglab/icons/server_edit.png similarity index 100% rename from src/icons/server_edit.png rename to pglab/icons/server_edit.png diff --git a/src/icons/server_go.png b/pglab/icons/server_go.png similarity index 100% rename from src/icons/server_go.png rename to pglab/icons/server_go.png diff --git a/src/icons/table_save.png b/pglab/icons/table_save.png similarity index 100% rename from src/icons/table_save.png rename to pglab/icons/table_save.png diff --git a/src/icons/token_shortland_character.png b/pglab/icons/token_shortland_character.png similarity index 100% rename from src/icons/token_shortland_character.png rename to pglab/icons/token_shortland_character.png diff --git a/src/json/json-forwards.h b/pglab/json/json-forwards.h similarity index 100% rename from src/json/json-forwards.h rename to pglab/json/json-forwards.h diff --git a/src/json/json.h b/pglab/json/json.h similarity index 100% rename from src/json/json.h rename to pglab/json/json.h diff --git a/src/jsoncpp.cpp b/pglab/jsoncpp.cpp similarity index 100% rename from src/jsoncpp.cpp rename to pglab/jsoncpp.cpp diff --git a/src/main.cpp b/pglab/main.cpp similarity index 100% rename from src/main.cpp rename to pglab/main.cpp diff --git a/src/pglab.ico b/pglab/pglab.ico similarity index 100% rename from src/pglab.ico rename to pglab/pglab.ico diff --git a/src/resources.qrc b/pglab/resources.qrc similarity index 100% rename from src/resources.qrc rename to pglab/resources.qrc diff --git a/src/sqlhighlighter.cpp b/pglab/sqlhighlighter.cpp similarity index 100% rename from src/sqlhighlighter.cpp rename to pglab/sqlhighlighter.cpp diff --git a/src/sqlhighlighter.h b/pglab/sqlhighlighter.h similarity index 100% rename from src/sqlhighlighter.h rename to pglab/sqlhighlighter.h diff --git a/src/sqlparser.cpp b/pglab/sqlparser.cpp similarity index 100% rename from src/sqlparser.cpp rename to pglab/sqlparser.cpp diff --git a/src/sqlparser.h b/pglab/sqlparser.h similarity index 100% rename from src/sqlparser.h rename to pglab/sqlparser.h diff --git a/src/src.pro b/pglab/src.pro similarity index 100% rename from src/src.pro rename to pglab/src.pro diff --git a/src/stopwatch.cpp b/pglab/stopwatch.cpp similarity index 100% rename from src/stopwatch.cpp rename to pglab/stopwatch.cpp diff --git a/src/stopwatch.h b/pglab/stopwatch.h similarity index 100% rename from src/stopwatch.h rename to pglab/stopwatch.h diff --git a/src/tsqueue.cpp b/pglab/tsqueue.cpp similarity index 100% rename from src/tsqueue.cpp rename to pglab/tsqueue.cpp diff --git a/src/tsqueue.h b/pglab/tsqueue.h similarity index 100% rename from src/tsqueue.h rename to pglab/tsqueue.h diff --git a/src/tuplesresultwidget.cpp b/pglab/tuplesresultwidget.cpp similarity index 100% rename from src/tuplesresultwidget.cpp rename to pglab/tuplesresultwidget.cpp diff --git a/src/tuplesresultwidget.h b/pglab/tuplesresultwidget.h similarity index 100% rename from src/tuplesresultwidget.h rename to pglab/tuplesresultwidget.h diff --git a/src/tuplesresultwidget.ui b/pglab/tuplesresultwidget.ui similarity index 100% rename from src/tuplesresultwidget.ui rename to pglab/tuplesresultwidget.ui diff --git a/src/typeselectionitemmodel.cpp b/pglab/typeselectionitemmodel.cpp similarity index 100% rename from src/typeselectionitemmodel.cpp rename to pglab/typeselectionitemmodel.cpp diff --git a/src/typeselectionitemmodel.h b/pglab/typeselectionitemmodel.h similarity index 100% rename from src/typeselectionitemmodel.h rename to pglab/typeselectionitemmodel.h diff --git a/src/util.cpp b/pglab/util.cpp similarity index 100% rename from src/util.cpp rename to pglab/util.cpp diff --git a/src/util.h b/pglab/util.h similarity index 100% rename from src/util.h rename to pglab/util.h diff --git a/src/waithandlelist.cpp b/pglab/waithandlelist.cpp similarity index 100% rename from src/waithandlelist.cpp rename to pglab/waithandlelist.cpp diff --git a/src/waithandlelist.h b/pglab/waithandlelist.h similarity index 93% rename from src/waithandlelist.h rename to pglab/waithandlelist.h index 376e817..38852b6 100644 --- a/src/waithandlelist.h +++ b/pglab/waithandlelist.h @@ -1,6 +1,7 @@ #ifndef WAITHANDLELIST_H #define WAITHANDLELIST_H +#ifdef _WIN32 #include #include @@ -22,5 +23,6 @@ public: private: std::vector m_waitHandles; }; +#endif // _WIN32 #endif // WAITHANDLELIST_H diff --git a/src/win32event.cpp b/pglab/win32event.cpp similarity index 100% rename from src/win32event.cpp rename to pglab/win32event.cpp diff --git a/src/win32event.h b/pglab/win32event.h similarity index 97% rename from src/win32event.h rename to pglab/win32event.h index 684d13f..d197556 100644 --- a/src/win32event.h +++ b/pglab/win32event.h @@ -1,8 +1,9 @@ #ifndef WIN32EVENT_H #define WIN32EVENT_H -#include +#ifdef _WIN32 +#include #include /** Simpel wrapper around a Win32 Event object. @@ -43,5 +44,6 @@ public: private: HANDLE hEvent; }; +#endif // _WIN32 #endif // WIN32EVENT_H diff --git a/pglabAll.pro b/pglabAll.pro deleted file mode 100644 index 14311a6..0000000 --- a/pglabAll.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = subdirs - -DEFINES += BOOST_ENABLE_ASSERT_HANDLER - -SUBDIRS += src \ - core - -CONFIG(debug, debug|release) { - SUBDIRS += tests -}