mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Don't paste NULL value when pasting from empty clipboard
When the clipboard is empty and trying to paste from it we would set the selected field to NULL. This is fixed by this commit, so that nothing happens.
This commit is contained in:
@@ -32,8 +32,11 @@ QList<QStringList> parseClipboard(QString clipboard)
|
||||
if(clipboard.endsWith("\r"))
|
||||
clipboard.chop(1);
|
||||
|
||||
// Prepare result list
|
||||
// Make sure there is some data in the clipboard
|
||||
QList<QStringList> result;
|
||||
if(clipboard.isEmpty())
|
||||
return result;
|
||||
|
||||
result.push_back(QStringList());
|
||||
|
||||
QRegExp re("(\"(?:[^\t\"]+|\"\"[^\"]*\"\")*)\"|(\t|\r?\n)");
|
||||
|
||||
Reference in New Issue
Block a user