Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
- name: Run clazy
uses: ./.github/actions/run-linter
with:
lint_program_with_args: clazy-standalone --checks=level1,no-fully-qualified-moc-types,no-non-pod-global-static,no-qstring-arg,no-qproperty-without-notify,no-range-loop-detach,no-lambda-unique-connection
lint_program_with_args: clazy-standalone --checks=level1,no-fully-qualified-moc-types,no-non-pod-global-static,no-qstring-arg,no-qproperty-without-notify,no-range-loop-detach,no-lambda-unique-connection,no-qstring-ref
5 changes: 0 additions & 5 deletions libqf/libqfcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ add_library(libqfcore SHARED
src/core/stacktrace.cpp
src/core/string.cpp
src/core/utils.cpp
src/model/datadocument.cpp
src/model/logtablemodel.cpp
src/model/sqldatadocument.cpp
src/model/sqltablemodel.cpp
src/model/tablemodel.cpp
src/network/networkaccessmanager.cpp
src/network/networkreply.cpp
src/sql/catalog.cpp
Expand Down
9 changes: 3 additions & 6 deletions libqf/libqfcore/src/core/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@

namespace qf::core {

const QString& Utils::nullValueString()
{
static QString n = QStringLiteral("null");
return n;
}

void qf::core::Utils::parseFieldName(const QString &full_field_name, QString *pfield_name, QString *ptable_name, QString *pdb_name)
{
QString s = full_field_name;
Expand Down Expand Up @@ -269,6 +263,9 @@ QStringList Utils::parseProgramAndArgumentsList(const QString &command_line)

QVariant Utils::jsonToQVariant(const QString &json)
{
if (json.isEmpty()) {
return {};
}
QJsonParseError error;
auto doc = QJsonDocument::fromJson(json.toUtf8(), &error);
if (error.error != QJsonParseError::NoError) {
Expand Down
1 change: 0 additions & 1 deletion libqf/libqfcore/src/core/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ namespace core {
class QFCORE_DECL_EXPORT Utils
{
public:
static const QString &nullValueString();
static void parseFieldName(const QString& full_field_name, QString *pfield_name = nullptr, QString *ptable_name = nullptr, QString *pdb_name = nullptr);
static QString composeFieldName(const QString &field_name, const QString &table_name = QString(), const QString &db_name = QString());
/// @returns: True if @a field_name1 ends with @a field_name2. Comparision is case insensitive
Expand Down
6 changes: 4 additions & 2 deletions libqf/libqfcore/src/sql/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ void Connection::close()
Connection Connection::forName(const QString &connection_name)
{
QString cn = connection_name;
if(cn.isEmpty())
if(cn.isEmpty()) {
cn = QSqlDatabase::defaultConnection;
Connection ret(QSqlDatabase::database(cn, false));
}
auto db = QSqlDatabase::database(cn, false);
Connection ret(db);
return ret;
}

Expand Down
9 changes: 9 additions & 0 deletions libqf/libqfqmlwidgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ add_library(libqfqmlwidgets SHARED
src/dateedit.cpp
src/datetimeedit.cpp
src/dialogbuttonbox.cpp

src/model/datadocument.cpp
src/model/logtablemodel.cpp
src/model/sqldatadocument.cpp
src/model/sqltablemodel.cpp
src/model/tablemodel.cpp

src/dialogs/dialog.cpp
src/dialogs/filedialog.cpp
src/dialogs/getiteminputdialog.cpp
Expand Down Expand Up @@ -98,8 +105,10 @@ add_library(libqfqmlwidgets SHARED
src/timeedit.cpp
src/toolbar.cpp
style/qf_qmlwidgets_style.qrc

images/qf_qmlwidgets_images.qrc
images/flat/qf_qmlwidgets_images_flat.qrc
images/dark/qf_qmlwidgets_images_dark.qrc
src/reports/widgets/printtableviewwidget/reports/qf_qmlwidgets_printtablewidget_reports.qrc
)

Expand Down
68 changes: 68 additions & 0 deletions libqf/libqfqmlwidgets/images/dark/clone-row.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions libqf/libqfqmlwidgets/images/dark/copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions libqf/libqfqmlwidgets/images/dark/cut.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions libqf/libqfqmlwidgets/images/dark/delete-column.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading