|
25 | 25 | All rights reserved.
|
26 | 26 |
|
27 | 27 | ParaView is a free software; you can redistribute it and/or modify it
|
28 |
| - under the terms of the ParaView license version 1.2. |
| 28 | + under the terms of the ParaView license version 1.2. |
29 | 29 |
|
30 | 30 | See http://www.paraview.org/paraview/project/license.html for the full ParaView license.
|
31 | 31 | A copy of this license can be obtained by contacting
|
@@ -457,7 +457,7 @@ void ctkConsolePrivate::keyPressEvent(QKeyEvent* e)
|
457 | 457 | return;
|
458 | 458 | }
|
459 | 459 |
|
460 |
| - // There seems to be no QKeySequence for backspace, therefore the key |
| 460 | + // There seems to be no QKeySequence for backspace, therefore the key |
461 | 461 | // has to be recognized directly (the same way as it is done in the parent class)
|
462 | 462 | if (e->key() == Qt::Key_Backspace && !(e->modifiers() & ~Qt::ShiftModifier))
|
463 | 463 | {
|
@@ -690,36 +690,6 @@ void ctkConsolePrivate::updateCompleter()
|
690 | 690 | commandText.remove('\r'); // not recongnize by python
|
691 | 691 | //commandText.replace(QRegExp("\\s*$"), ""); // Remove trailing spaces ---- DOESN'T WORK ----
|
692 | 692 |
|
693 |
| - // Remove useless spaces |
694 |
| - bool betweenSingleQuotes = false; |
695 |
| - bool betweenDoubleQuotes = false; |
696 |
| - if (commandText.contains(" ")) |
697 |
| - { |
698 |
| - // For each char |
699 |
| - for (int i=0; i<commandText.size();i++) |
700 |
| - { |
701 |
| - // Verify if you are between betweenDoubleQuotes:" " or betweenSingleQuotes:' ' |
702 |
| - QChar c = commandText.at(i); |
703 |
| - if (c == '\'' && !betweenDoubleQuotes) |
704 |
| - { |
705 |
| - betweenSingleQuotes = !betweenSingleQuotes; |
706 |
| - } |
707 |
| - if (c == '"' && !betweenSingleQuotes) |
708 |
| - { |
709 |
| - betweenDoubleQuotes = !betweenDoubleQuotes; |
710 |
| - } |
711 |
| - // If we are not between quote: Erase spaces |
712 |
| - if (!betweenSingleQuotes && !betweenDoubleQuotes) |
713 |
| - { |
714 |
| - if (c == ' ') |
715 |
| - { |
716 |
| - commandText.remove(i,1); |
717 |
| - i--; // because we removed a char |
718 |
| - } |
719 |
| - } |
720 |
| - } |
721 |
| - } |
722 |
| - |
723 | 693 | // Save current positions: Since some implementation of
|
724 | 694 | // updateCompletionModel (e.g python) can display messages
|
725 | 695 | // while building the completion model, it is important to save
|
|
0 commit comments