Mercurial > octave
comparison libgui/qterminal/libqterminal/QTerminal.cc @ 20146:f5e65f806123
fix checking copy shortcut in terminal when no setting available (bug #44968)
* QTerminal.cc (notice_settings): check for empty copy shortcut from settings
file and take the default in this case
author | Torsten <ttl@justmail.de> |
---|---|
date | Fri, 01 May 2015 08:56:48 +0200 |
parents | 88233ac3f3ea |
children | f99cbd86a0f9 |
comparison
equal
deleted
inserted
replaced
20144:3797df921988 | 20146:f5e65f806123 |
---|---|
137 QString key = QString ("shortcuts/main_edit:copy"); | 137 QString key = QString ("shortcuts/main_edit:copy"); |
138 if (set) | 138 if (set) |
139 key.append ("_1"); // if second set is active | 139 key.append ("_1"); // if second set is active |
140 copy = QKeySequence (settings->value (key).toString ()); // the copy shortcut | 140 copy = QKeySequence (settings->value (key).toString ()); // the copy shortcut |
141 | 141 |
142 // if copy is empty, shortcuts are not yet in the settings (take the default) | |
143 if (copy.isEmpty ()) // QKeySequence::Copy as second argument in | |
144 copy = QKeySequence::Copy; // settings->value () does not work! | |
145 | |
142 // dis- or enable extra interrupt action | 146 // dis- or enable extra interrupt action |
143 QKeySequence ctrl; | 147 QKeySequence ctrl; |
144 ctrl = Qt::ControlModifier; | 148 ctrl = Qt::ControlModifier; |
145 | 149 |
146 bool extra_ir_action = (copy != QKeySequence (ctrl + Qt::Key_C)); | 150 bool extra_ir_action = (copy != QKeySequence (ctrl + Qt::Key_C)); |