Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# Pour la bibliothèque QtPython :
set (QT_PYTHON_MAJOR_VERSION "6")
set (QT_PYTHON_MINOR_VERSION "3")
set (QT_PYTHON_RELEASE_VERSION "1")
set (QT_PYTHON_RELEASE_VERSION "2")
set (QT_PYTHON_VERSION ${QT_PYTHON_MAJOR_VERSION}.${QT_PYTHON_MINOR_VERSION}.${QT_PYTHON_RELEASE_VERSION})

# Pour la bibliothèque QtPython3 :
set (QT_PYTHON_3_MAJOR_VERSION "6")
set (QT_PYTHON_3_MINOR_VERSION "3")
set (QT_PYTHON_3_RELEASE_VERSION "1")
set (QT_PYTHON_3_RELEASE_VERSION "2")
set (QT_PYTHON_3_VERSION ${QT_PYTHON_3_MAJOR_VERSION}.${QT_PYTHON_3_MINOR_VERSION}.${QT_PYTHON_3_RELEASE_VERSION})

19 changes: 13 additions & 6 deletions src/QtPython3/QtPythonConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ bool QtPythonConsole::Instruction::isRunnable (const string& instruction)
// ============================================================================


const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::COMMENT);
// 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
// pour une raison non élucidée), mais où ???
//const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::COMMENT); // v 6.3.2
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::INSTRUCTION); // v 6.3.2
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::emptyLineFormat (QtPythonConsole::QtScriptTextFormat::BLANK);
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::instructionFormat (QtPythonConsole::QtScriptTextFormat::INSTRUCTION);
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::ranInstructionFormat (QtPythonConsole::QtScriptTextFormat::RAN_INSTRUCTION);
Expand Down Expand Up @@ -1555,7 +1558,8 @@ void QtPythonConsole::lineProcessedCallback (const string& fileName, size_t line
ConsoleOutput::cerr ( ) << mess << co_endl;
}

lineProcessedCallback (consoleLine, true, error);
lineProcessedCallback (consoleLine, ok, error); // v 6.3.2 (sinon ligne écrite 2 fois dans le script généré)
// lineProcessedCallback (consoleLine, true, error);
} // QtPythonConsole::lineProcessedCallback


Expand Down Expand Up @@ -1722,8 +1726,7 @@ void QtPythonConsole::addToHistoric (
if (linesCount > 1)
{
size_t i = 0;
for (vector<string>::const_iterator itl = lines.begin ( );
lines.end ( ) != itl; itl++, i++)
for (vector<string>::const_iterator itl = lines.begin ( ); lines.end ( ) != itl; itl++, i++)
{
const string comms (0 == i ? comments.utf8 ( ) : string ( ));
const string out (0 == i ? commandOutput.utf8 ( ) : string ( ));
Expand All @@ -1748,15 +1751,19 @@ void QtPythonConsole::addToHistoric (
setTextCursor (cursor);
if (false == scriptingLog.getComment ( ).empty ( )) // v 2.7.0
{
const UTF8String comment (PythonLogOutputStream::toComment (scriptingLog.getComment ( )),
Charset::UTF_8);
const UTF8String comment (PythonLogOutputStream::toComment (scriptingLog.getComment ( )), Charset::UTF_8);
const size_t commentLineNum = lineNumber (comment.utf8 ( )); // v 6.3.2
line += lineNumber (comment.utf8 ( ));
cursor.insertText (UTF8TOQSTRING (comment));
cursor.insertText ("\n");
block = block.next ( );
cursor.setPosition (block.position ( ), QTextCursor::MoveAnchor);
setTextCursor (cursor);
line -= commentLineNum; // v 6.3.2
} // if (false == scriptingLog.getComment ( ).empty ( ))
else
line--; // v 6.3.2

if (true == statusErr)
{
UTF8String error (charset);
Expand Down
8 changes: 8 additions & 0 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 6.3.2 : 24/10/23
===============

Correctifs console python 3 :
- gestion de l'historique avec les touches fl�che haut/bas.
- gestion couleur des affichages (parfois en bleu � la place du noir).


Version 6.3.0 : 21/06/23
===============

Expand Down