Fixes mostly based on coverity scan
ClosedPublic

Authored by staniek on Feb 25 2016, 8:49 PM.

Details

Summary

Many commits, mostly after use of https://scan.coverity.com/projects/kde?tab=overview:

GIT_SILENT unused code--

Make KUndo2Stack::push return false if the command was merged (and deleted) rather than pushed

This helps to know if the command object can be still accessed after the call.

CID #1354238

Make sure we check if success of QCache::insert is checked, the object can be deleted already if not

CID #1354236

Connection set's removeConnectionData no longer removed the data object.

This removes double deletion in KexiConnectionSelectorWidget::slotRemoteAddBtnClicked() when adding connection failed.

CID #1354237

KexiGUIMessageHandler::showErrorMessage: avoid possible crash

KexiFormView::storeData: avoid possible crash

Remove useless call in KexiBlobTableEdit

CID #1354232

GIT_SILENT Disable dead code

CID #1354223

Remove dead code and fix if's

CID #1354221

Missing {} for "if"!

Found as structurally dead code by CID #1354220, good!

GIT_SILENT dead code--

GIT_SILENT simplify code

CID #1353848

GIT_SILENT disable unused code, add todo

CID #1353844

Missing break

CID #1353934

Use Qt::NoModifier for modifiers, not Qt::NoButton

Still not a big deal because both values are 0

CID #1353936

Table Designer: fix memory leak when not creating a new ChangeFieldPropertyCommand

CID #1353964

Report Designer: properly delete renderers

CID #1353961
CID #1353962

Unused KUndo2Command::timedID member

CID #1335671

Improve direct initialization of KUndo2View internals

CID #1335782

KexiReportDesignView: Remove possible dereference of nullptr

CID #1353977

KexiItemMenu: Remove possible nullptr dereference

CID #1353974

GIT_SILENT warnings--

CID #1353509

KexiDBReportData::setSorting: Check result of appending sort field

CID #1353507

KexiQueryView: fix logical vs. bitwise operator - can cause issues on view switching

Good find!
CID #1353514

GIT_SILENT Remove unused variables

CID #1354193

GIT_SILENT Remove unused memeber

CID #1354184

Clear status in KexiProject::items, otherwise calling it after error message will repeat the message

Fix order of initialization in KexiActionSelectionDialog (removes crash, regression in 3.0)

GIT_SILENT Fix signal signature in KexiActionSelectionDialog

KexiActionSelectionDialog: Fix potential nullptr dereferences, add some constness

CID #1354181

KexiDBDatePicker: add missing initialization, remove unused members

CID #1354156

GIT_SILENT KexiDataSourcePage: Remove unused members

CID #1354153

Fix possible dereferences when dynamic_cast<> returns nullptr

(from Coverity reports)

Fix control flow issues, invalid expressions, type issues

(from Coverity reports)

KexiComboBoxBase: Fix integer handling (invalid index possible)

CID #1353938, #1353939

Check results of dynamic_cast, add missing initializations, remove unused variables

(from Coverity reports)

Test Plan

Running Kexi?

Diff Detail

Repository
R71 Kexi
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
staniek updated this revision to Diff 2466.Feb 25 2016, 8:49 PM
staniek retitled this revision from to GIT_SILENT unused code--.
staniek updated this object.
staniek edited the test plan for this revision. (Show Details)
staniek added reviewers: piggz, wkosowicz, kpawlowski, wicik.
staniek added a subscriber: Kexi-Devel-list.
Restricted Application added a project: KEXI. · View Herald TranscriptFeb 25 2016, 8:49 PM
staniek retitled this revision from GIT_SILENT unused code-- to Fixes mostly based on coverity scan.Feb 25 2016, 8:51 PM
staniek updated this object.
staniek edited the test plan for this revision. (Show Details)
piggz accepted this revision.Mar 4 2016, 10:52 PM
piggz edited edge metadata.
This revision is now accepted and ready to land.Mar 4 2016, 10:52 PM
staniek closed this revision.Mar 8 2016, 10:15 PM