Skip to content

Commit 7310796

Browse files
author
Charles PIGNEROL
committed
Version 6.3.2. Python 3 console fixes: history management with the up/down arrow keys, color management of displays (sometimes blue instead of black).
1 parent b903b4d commit 7310796

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

cmake/version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# Pour la bibliothèque QtPython :
66
set (QT_PYTHON_MAJOR_VERSION "6")
77
set (QT_PYTHON_MINOR_VERSION "3")
8-
set (QT_PYTHON_RELEASE_VERSION "1")
8+
set (QT_PYTHON_RELEASE_VERSION "2")
99
set (QT_PYTHON_VERSION ${QT_PYTHON_MAJOR_VERSION}.${QT_PYTHON_MINOR_VERSION}.${QT_PYTHON_RELEASE_VERSION})
1010

1111
# Pour la bibliothèque QtPython3 :
1212
set (QT_PYTHON_3_MAJOR_VERSION "6")
1313
set (QT_PYTHON_3_MINOR_VERSION "3")
14-
set (QT_PYTHON_3_RELEASE_VERSION "1")
14+
set (QT_PYTHON_3_RELEASE_VERSION "2")
1515
set (QT_PYTHON_3_VERSION ${QT_PYTHON_3_MAJOR_VERSION}.${QT_PYTHON_3_MINOR_VERSION}.${QT_PYTHON_3_RELEASE_VERSION})
1616

src/QtPython3/QtPythonConsole.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ bool QtPythonConsole::Instruction::isRunnable (const string& instruction)
271271
// ============================================================================
272272

273273

274-
// v 6.3.1 : on annule commentFormat, la colorisation QtPythonSyntaxHighlighter et il semble qu'il y ait un bogue (les commandes sont bleues dans certains cas
274+
// v 6.3.2 : on annule commentFormat, la colorisation QtPythonSyntaxHighlighter et il semble qu'il y ait un bogue (les commandes sont bleues dans certains cas
275275
// pour une raison non élucidée), mais où ???
276-
//const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::COMMENT); // v 6.3.1
277-
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::INSTRUCTION); // v 6.3.1
276+
//const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::COMMENT); // v 6.3.2
277+
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::INSTRUCTION); // v 6.3.2
278278
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::emptyLineFormat (QtPythonConsole::QtScriptTextFormat::BLANK);
279279
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::instructionFormat (QtPythonConsole::QtScriptTextFormat::INSTRUCTION);
280280
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::ranInstructionFormat (QtPythonConsole::QtScriptTextFormat::RAN_INSTRUCTION);
@@ -1558,7 +1558,7 @@ void QtPythonConsole::lineProcessedCallback (const string& fileName, size_t line
15581558
ConsoleOutput::cerr ( ) << mess << co_endl;
15591559
}
15601560

1561-
lineProcessedCallback (consoleLine, ok, error); // v 6.3.1 (sinon ligne écrite 2 fois dans le script généré)
1561+
lineProcessedCallback (consoleLine, ok, error); // v 6.3.2 (sinon ligne écrite 2 fois dans le script généré)
15621562
// lineProcessedCallback (consoleLine, true, error);
15631563
} // QtPythonConsole::lineProcessedCallback
15641564

@@ -1752,17 +1752,17 @@ void QtPythonConsole::addToHistoric (
17521752
if (false == scriptingLog.getComment ( ).empty ( )) // v 2.7.0
17531753
{
17541754
const UTF8String comment (PythonLogOutputStream::toComment (scriptingLog.getComment ( )), Charset::UTF_8);
1755-
const size_t commentLineNum = lineNumber (comment.utf8 ( )); // v 6.3.1
1755+
const size_t commentLineNum = lineNumber (comment.utf8 ( )); // v 6.3.2
17561756
line += lineNumber (comment.utf8 ( ));
17571757
cursor.insertText (UTF8TOQSTRING (comment));
17581758
cursor.insertText ("\n");
17591759
block = block.next ( );
17601760
cursor.setPosition (block.position ( ), QTextCursor::MoveAnchor);
17611761
setTextCursor (cursor);
1762-
line -= commentLineNum; // v 6.3.1
1762+
line -= commentLineNum; // v 6.3.2
17631763
} // if (false == scriptingLog.getComment ( ).empty ( ))
17641764
else
1765-
line--; // v 6.3.1
1765+
line--; // v 6.3.2
17661766

17671767
if (true == statusErr)
17681768
{
@@ -2244,7 +2244,6 @@ void QtPythonConsole::addToHistoric (const string& instruction)
22442244

22452245
const size_t size = _history.size ( );
22462246

2247-
cout << __FILE__ << ' ' << __LINE__ << " QtPythonConsole::addToHistoric. REGISTERING COMMAND=" << instruction << endl;
22482247
if ((0 == size) || (_history [size - 1] != instruction))
22492248
_history.push_back (instruction);
22502249

versions.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Version 6.3.2 : 24/10/23
2+
===============
3+
4+
Correctifs console python 3 :
5+
- gestion de l'historique avec les touches fl�che haut/bas.
6+
- gestion couleur des affichages (parfois en bleu � la place du noir).
7+
8+
19
Version 6.3.0 : 21/06/23
210
===============
311

0 commit comments

Comments
 (0)