mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-05 11:29:22 -05:00
Fix collate warning after addition of multi-threaded loading
The no collate function warning is triggered in a thread which is used for loading data. However, the warning is a message box and GUI elements can only be drawn in the main thread. So the old code would crash. This is fixed here by jumping to the main thread for showing the message box.
This commit is contained in:
@@ -19,6 +19,8 @@ enum
|
||||
typedef QMultiMap<QString, sqlb::ObjectPtr> objectMap; // Maps from object type (table, index, view, trigger) to a pointer to the object representation
|
||||
typedef QMap<QString, objectMap> schemaMap; // Maps from the schema name (main, temp, attached schemas) to the object map for that schema
|
||||
|
||||
int collCompare(void* pArg, int eTextRepA, const void* sA, int eTextRepB, const void* sB);
|
||||
|
||||
class DBBrowserDB : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -117,6 +119,7 @@ signals:
|
||||
void sqlExecuted(QString sql, int msgtype);
|
||||
void dbChanged(bool dirty);
|
||||
void structureUpdated();
|
||||
void requestCollation(QString name, int eTextRep);
|
||||
|
||||
private:
|
||||
QString curDBFilename;
|
||||
@@ -125,6 +128,8 @@ private:
|
||||
bool isEncrypted;
|
||||
bool isReadOnly;
|
||||
|
||||
void collationNeeded(void* pData, sqlite3* db, int eTextRep, const char* sCollationName);
|
||||
|
||||
bool tryEncryptionSettings(const QString& filename, bool* encrypted, CipherDialog*& cipherSettings);
|
||||
|
||||
bool dontCheckForStructureUpdates;
|
||||
|
||||
Reference in New Issue
Block a user