diff options
| author | 2018-07-27 23:54:15 -0400 | |
|---|---|---|
| committer | 2018-07-27 23:54:15 -0400 | |
| commit | 6d3d39356473078c6b47e03b8a7616e4b34de928 (patch) | |
| tree | fe5be2e6a08e4cfc73207746aba4c9fccfecfa10 /SQLiteStudio3/guiSQLiteStudio/sqleditor.h | |
| parent | f98e49169a40876bcf1df832de6e908d1b350193 (diff) | |
| parent | feda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (diff) | |
Update upstream source from tag 'upstream/3.2.1+dfsg1'
Update to upstream version '3.2.1+dfsg1'
with Debian dir 5ea0333565de4dc898c062cc0ff4ba1153e2c1e4
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/sqleditor.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/sqleditor.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/sqleditor.h b/SQLiteStudio3/guiSQLiteStudio/sqleditor.h index 1c98682..c56492c 100644 --- a/SQLiteStudio3/guiSQLiteStudio/sqleditor.h +++ b/SQLiteStudio3/guiSQLiteStudio/sqleditor.h @@ -13,11 +13,17 @@ #include <QFuture> class CompleterWindow; -class QTimer; class Parser; class SqlEditor; class SearchTextDialog; class SearchTextLocator; +class LazyTrigger; + +#ifdef Q_OS_OSX +# define COMPLETE_REQ_KEY Qt::META +#else +# define COMPLETE_REQ_KEY Qt::CTRL +#endif CFG_KEY_LIST(SqlEditor, QObject::tr("SQL editor input field"), CFG_KEY_ENTRY(CUT, QKeySequence::Cut, QObject::tr("Cut selected text")) @@ -34,7 +40,7 @@ CFG_KEY_LIST(SqlEditor, QObject::tr("SQL editor input field"), CFG_KEY_ENTRY(FIND_PREV, QKeySequence::FindPrevious, QObject::tr("Find previous")) CFG_KEY_ENTRY(REPLACE, QKeySequence::Replace, QObject::tr("Replace in text")) CFG_KEY_ENTRY(DELETE_LINE, Qt::CTRL + Qt::Key_D, QObject::tr("Delete current line")) - CFG_KEY_ENTRY(COMPLETE, Qt::CTRL + Qt::Key_Space, QObject::tr("Request code assistant")) + CFG_KEY_ENTRY(COMPLETE, COMPLETE_REQ_KEY + Qt::Key_Space, QObject::tr("Request code assistant")) CFG_KEY_ENTRY(FORMAT_SQL, Qt::CTRL + Qt::Key_T, QObject::tr("Format contents")) CFG_KEY_ENTRY(MOVE_BLOCK_DOWN, Qt::ALT + Qt::Key_Down, QObject::tr("Move selected block of text one line down")) CFG_KEY_ENTRY(MOVE_BLOCK_UP, Qt::ALT + Qt::Key_Up, QObject::tr("Move selected block of text one line up")) @@ -199,10 +205,10 @@ class GUI_API_EXPORT SqlEditor : public QPlainTextEdit, public ExtActionContaine QMenu* validObjContextMenu = nullptr; Db* db = nullptr; CompleterWindow* completer = nullptr; - QTimer* autoCompleteTimer = nullptr; + LazyTrigger* autoCompleteTrigger = nullptr; bool autoCompletion = true; bool deletionKeyPressed = false; - QTimer* queryParserTimer = nullptr; + LazyTrigger* queryParserTrigger = nullptr; Parser* queryParser = nullptr; QHash<QString,QStringList> objectsInNamedDb; QMutex objectsInNamedDbMutex; @@ -254,7 +260,7 @@ class GUI_API_EXPORT SqlEditor : public QPlainTextEdit, public ExtActionContaine void backspacePressed(); void complete(); void completeSelected(); - void scheduleAutoCompletion(); +// void scheduleAutoCompletion(); void checkForAutoCompletion(); void completerTypedText(const QString& text); void completerBackspacePressed(); @@ -266,6 +272,7 @@ class GUI_API_EXPORT SqlEditor : public QPlainTextEdit, public ExtActionContaine void highlightCurrentLine(); void updateLineNumberArea(const QRect&rect, int dy); void cursorMoved(); + void checkContentSize(); void formatSql(); void saveToFile(); void saveAsToFile(); |
