Switch to cmake + vcpkg, builds on linux, windows needs verification.

Code has been modified to be portable.
This commit is contained in:
eelke 2026-10-17 16:21:22 +02:00
parent c1a5ac1aad
commit 49f6619a4e
34 changed files with 678 additions and 327 deletions

View file

@ -1,13 +1,15 @@
#include "PgLanguage.h"
#include <stdexcept>
QString PgLanguage::createSql() const
{
throw std::exception("PgLanguage::createSql() not implemented");
throw std::logic_error("PgLanguage::createSql() not implemented");
}
QString PgLanguage::dropSql() const
{
throw std::exception("PgLanguage::dropSql() not implemented");
throw std::logic_error("PgLanguage::dropSql() not implemented");
}
QString PgLanguage::typeName() const

View file

@ -48,15 +48,15 @@ namespace {
for(; index < len; index++) {
QChar ch = str[index];
if (!double_quote && ch == L'\'')
if (!double_quote && ch == u'\'')
single_quote = !single_quote;
else if (!single_quote && ch == L'"')
else if (!single_quote && ch == u'"')
double_quote = !double_quote;
else if (!double_quote && !single_quote && ch == L'(')
else if (!double_quote && !single_quote && ch == u'(')
brackets++;
else if (!double_quote && !single_quote && ch == L')')
else if (!double_quote && !single_quote && ch == u')')
brackets--;
else if (!double_quote && !single_quote && brackets == 0 && ch == L',') {
else if (!double_quote && !single_quote && brackets == 0 && ch == u',') {
if (index != start_array)
res.push_back(str.mid(start_array, index - 1).trimmed());
else

View file

@ -38,7 +38,7 @@ QString PgServerObject::alterOwnerSql(const QString& ident) const
}
void PgServerObject::setAcls(boost::optional<AclList> acls)
void PgServerObject::setAcls(std::optional<AclList> acls)
{
m_acls = std::move(acls);
}

View file

@ -4,7 +4,7 @@
#include <QString>
#include "PgObject.h"
#include "PgAcl.h"
#include <boost/optional.hpp>
#include <optional>
class PgAuthId;
@ -26,7 +26,7 @@ public:
* @brief setAcls
* @param acls Important: pass empty optional when acl IS NULL, pass empty list for empty array
*/
void setAcls(boost::optional<AclList> acls);
void setAcls(std::optional<AclList> acls);
QString aclString() const;
/**
* @brief grantSql
@ -53,7 +53,7 @@ protected:
private:
Oid m_ownerOid = InvalidOid;
const PgAuthId * m_owner = nullptr;
boost::optional<AclList> m_acls;
std::optional<AclList> m_acls;
};
#endif // PGSERVEROBJECT_H