Gen code for query #78

Merged
eelke merged 11 commits from gen-code-for-query into master 2018-09-23 08:38:07 +00:00
13 changed files with 52 additions and 43 deletions
Showing only changes of commit 780d912cd1 - Show all commits

12
common.pri Normal file
View file

@ -0,0 +1,12 @@
INCLUDEPATH += C:\prog\include C:\prog\include\pgsql C:\VSproj\boost\include\boost-1_68
LIBS += -LC:\VSproj\boost\lib -LC:/PROG/LIB -lws2_32 -llibpq
QMAKE_CXXFLAGS += /std:c++17
# 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
DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX

View file

@ -8,23 +8,14 @@ QT -= gui
TARGET = core
TEMPLATE = lib
CONFIG += staticlib c++14
CONFIG += staticlib c++17
QMAKE_CXXFLAGS += /std:c++17
! include( ../common.pri ) {
error( "Couldn't find the common.pri file!" )
}
INCLUDEPATH += C:\prog\include \
C:\Prog\include\pgsql \
C:\VSproj\boost32\include\boost-1_65_1
INCLUDEPATH += C:\Prog\include\pgsql
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.

View file

@ -6,14 +6,14 @@ namespace boost
void assertion_failed(char const * expr, char const * function, char const * file, long line)
{
std::ostringstream out;
out << "Assertion failure int " << function << " " << file << ":" << line;
out << "Assertion failure int " << function << " " << file << ":" << line << "\n" << expr;
throw std::runtime_error(out.str());
}
void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line)
{
std::ostringstream out;
out << "Assertion failure int " << function << " " << file << ":" << line << "\n"<< msg;
out << "Assertion failure int " << function << " " << file << ":" << line << "\n" << msg << "\n" << expr;
throw std::runtime_error(out.str());
}
}

View file

@ -14,7 +14,7 @@ QMAKE_CXXFLAGS += /std:c++17
INCLUDEPATH += C:\prog\include \
C:\Prog\include\pgsql \
C:\VSproj\boost32\include\boost-1_65_1
C:\VSproj\boost32\include
DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX

View file

@ -23,3 +23,4 @@ QFont UserConfiguration::codeFont() const
font.setPointSize(size);
return font;
}

View file

@ -2,6 +2,8 @@
#define USERCONFIGURATION_H
#include <QSettings>
/** Class for most of the program configuration
*
* The settings represented by this class are stored in a settings file
@ -17,6 +19,8 @@ public:
UserConfiguration();
QFont codeFont() const;
private:
QSettings m_settings;
};

View file

@ -9,15 +9,18 @@ QT += core gui concurrent
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql
QMAKE_CXXFLAGS += /std:c++17
TARGET = pglab
TEMPLATE = app
INCLUDEPATH += C:\prog\include C:\Prog\include\pgsql C:\VSproj\boost32\include\boost-1_65_1
DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX _WIN32_WINNT=0x0501
! include( ../common.pri ) {
error( "Couldn't find the common.pri file!" )
}
INCLUDEPATH += C:\Prog\include\pgsql
DEFINES += _WIN32_WINNT=0x0501
#LIBS += -LC:/prog/boost/lib -Lc:/prog/lib libpq.lib fmt.lib User32.lib ws2_32.lib
LIBS += -LC:\VSproj\boost32\lib -LC:/PROG/LIB -lws2_32 -llibpq
#LIBS += -LC:\VSproj\boost32\lib -LC:/PROG/LIB -lws2_32 -llibpq
#debug {
LIBS += c:/prog/lib/botand_imp.lib

View file

@ -2,7 +2,6 @@ TEMPLATE = subdirs
DEFINES += BOOST_ENABLE_ASSERT_HANDLER
SUBDIRS += core \
ctk \
pgsql \
@ -15,7 +14,6 @@ pglablib.depends = core pgsql
tests.depends = core pgsql pglablib
CONFIG(debug, debug|release) {
SUBDIRS += tests
}

View file

@ -10,15 +10,11 @@ TARGET = pglablib
TEMPLATE = lib
CONFIG += staticlib
QMAKE_CXXFLAGS += /std:c++17
! include( ../common.pri ) {
error( "Couldn't find the common.pri file!" )
}
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has 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
INCLUDEPATH += C:\prog\include C:\Prog\include\pgsql C:\VSproj\boost32\include\boost-1_65_1
INCLUDEPATH += C:\Prog\include\pgsql
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.

View file

@ -12,13 +12,10 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql
TARGET = pgsql
TEMPLATE = lib
INCLUDEPATH += C:\prog\include \
C:\Prog\include\pgsql \
C:\VSproj\boost32\include\boost-1_65_1
! include( ../common.pri ) {
error( "Couldn't find the common.pri file!" )
}
QMAKE_CXXFLAGS += /std:c++17
DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX
#LIBS += -LC:/prog/boost/lib -Lc:/prog/lib libpq.lib fmt.lib User32.lib ws2_32.lib
LIBS += -LC:/PROG/LIB -lws2_32 -llibpq

View file

@ -1,16 +1,19 @@
! include( ../../common.pri ) {
error( "Couldn't find the common.pri file!" )
}
include(gtest_dependency.pri)
TEMPLATE = app
CONFIG += console c++11
CONFIG += console c++17
CONFIG -= app_bundle
CONFIG += thread
CONFIG += qt
QT += core
QMAKE_CXXFLAGS += /std:c++17
INCLUDEPATH += C:\Prog\include\pgsql
INCLUDEPATH += C:\prog\include C:\Prog\include\pgsql
HEADERS +=

View file

@ -9,7 +9,11 @@ CONFIG += qt
QT += core widgets
QMAKE_CXXFLAGS += /std:c++17
LIBS += -LC:\VSproj\boost32\lib -LC:/PROG/LIB -lws2_32 -llibpq
! include( ../../common.pri ) {
error( "Couldn't find the common.pri file!" )
}
HEADERS +=
@ -30,7 +34,7 @@ else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../core/debug/ -
INCLUDEPATH += C:\prog\include \
C:\Prog\include\pgsql \
C:\VSproj\boost32\include\boost-1_65_1
C:\VSproj\boost32\include
INCLUDEPATH += $$PWD/../../core
DEPENDPATH += $$PWD/../../core

View file

@ -1,9 +1,9 @@
#include <gtest/gtest.h>
#include <gmock/gmock-matchers.h>
#include "PrintTo_Qt.h"
#include <QRegularExpression>
#include "PgType.h"
#include "PgTypeContainer.h"
#include "PrintTo_Qt.h"
#include "codebuilder/IndentationConfig.h"
#include "codebuilder/TypeMappings.h"
#include "Pgsql_oids.h"