mirror of
https://github.com/QuasarApp/Heart.git
synced 2025-05-12 09:29:41 +00:00
added simpel options
This commit is contained in:
parent
35f266ad88
commit
d3aec158e0
@ -35,6 +35,8 @@ endif()
|
||||
option(HEART_STATIC_SSL "This option enable or disabled static link ssl libraryes" OFF)
|
||||
option(HEART_DEPRECATED_API "This option enable or disabled deprecated command api" OFF)
|
||||
option(CMAKE_SHARE "This option enable or disabled ssl functions of nodes" OFF)
|
||||
option(PRINT_SQL_QUERIES "This option enable or disabled log of all sql queries" OFF)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Enable or disable shared libraryes" OFF)
|
||||
|
||||
if (WIN32)
|
||||
|
@ -21,6 +21,10 @@ if (HEART_DEPRECATED_API)
|
||||
add_definitions(-DHEART_DEPRECATED_API)
|
||||
endif()
|
||||
|
||||
if (PRINT_SQL_QUERIES)
|
||||
add_definitions(-DPRINT_SQL_QUERIES)
|
||||
endif()
|
||||
|
||||
set(SLL_DEFINE "WITHOUT_SSL")
|
||||
|
||||
if (HEART_SSL)
|
||||
|
@ -27,14 +27,16 @@ QSharedPointer<DBObject> iObjectProvider::getObjectRaw(
|
||||
|
||||
if (list.size() > 1) {
|
||||
QuasarAppUtils::Params::log("getObject method returned more than one object,"
|
||||
" the first object was selected as the result, all the rest were lost.",
|
||||
" the first object was selected as the result,"
|
||||
" all the rest were lost.",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
|
||||
return list.first();
|
||||
}
|
||||
|
||||
bool QH::iObjectProvider::insertIfExistsUpdateObject(const QSharedPointer<PKG::DBObject> &saveObject, bool wait) {
|
||||
bool QH::iObjectProvider::insertIfExistsUpdateObject(const QSharedPointer<PKG::DBObject> &saveObject,
|
||||
bool wait) {
|
||||
|
||||
bool restore = saveObject->printError();
|
||||
|
||||
|
@ -485,6 +485,13 @@ bool SqlDBWriter::workWithQuery(QSqlQuery &q,
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef PRINT_SQL_QUERIES
|
||||
QuasarAppUtils::Params::log(QString("Query executed successfull into %0\n"
|
||||
"query: %1").
|
||||
arg(_db->databaseName(), q.executedQuery()),
|
||||
QuasarAppUtils::Debug);
|
||||
#endif
|
||||
|
||||
return cb();
|
||||
}
|
||||
case PrepareResult::Disabled: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user