Repository navigation
Fix/report query prepare errors - #4230
Open
deepsidhu1313 wants to merge 8 commits into
Open
deepsidhu1313 wants to merge 8 commits into
deepsidhu1313 wants to merge 8 commits into
Conversation
SqliteTableModel::setTypedData() accessed m_cache with at(). The cache is
sparse and rows beyond the loaded chunk are valid model rows (rowCount()
includes them), so editing such a row, e.g. by pasting a large clipboard,
raised std::out_of_range ("no matching segment found") and terminated the
application.
Load the row first (triggerCacheLoad + waitUntilIdle, as find() already
does) and skip the edit if it is still not available.
Add a test-table-model target covering both an uncached and a cached row.
Fixes sqlitebrowser#3892
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The test used QTEST_MAIN, which needs a Qt platform plugin and aborted on the headless CI runners. Select the offscreen platform in main() unless QT_QPA_PLATFORM is already set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
RowLoader::process() ignored a statement that failed to prepare, so the model showed an empty table without setting any error, e.g. after the table was dropped by another program or while the database was locked. Emit the error like it is already done for failing steps, so that SqliteTableModel::lastError() is set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
create() closes the sqlite3 handle and then calls open(), which closes the dangling handle a second time. That crashed the test on Windows CI. Open an empty database file instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test-global-filter needs the CMake prefix paths on PATH on Windows because the CI jobs build SQLite as a DLL there. test-table-model links SQLite too and crashed on Windows without them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The .ui files connect to slots that don't exist in Qt6 (QDialog::help) unless uic generates string based connections. The main target already sets this option for Qt6, but test-table-model compiles CipherDialog.ui as well and failed to build in the Windows on ARM job. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SqliteTableModel::setTypedData() accessed m_cache with at(). The cache is
sparse and rows beyond the loaded chunk are valid model rows (rowCount()
includes them), so editing such a row, e.g. by pasting a large clipboard,
raised std::out_of_range ("no matching segment found") and terminated the
application.
Load the row first (triggerCacheLoad + waitUntilIdle, as find() already
does) and skip the edit if it is still not available.
Add a test-table-model target covering both an uncached and a cached row.
Fixes #3892
Co-Authored-By: Claude Sonnet 5.5 noreply@anthropic.com