From 627fc0ed620c1942afea9483bfaba794418d0300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 14 Mar 2021 00:44:07 +0100 Subject: Added controlled conversions to char* instead of automatic ascii conversions. The definition of -UTQT_NO_ASCII_CAST is no longer needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeLists.txt | 2 +- kdbg/dbgdriver.cpp | 6 +++--- kdbg/dbgmainwnd.cpp | 4 ++-- kdbg/memwindow.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ceba2e..b236f05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ include( ConfigureChecks.cmake ) ###### global compiler settings -add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST ) +add_definitions( -DHAVE_CONFIG_H ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) diff --git a/kdbg/dbgdriver.cpp b/kdbg/dbgdriver.cpp index 95bd843..eb6bbf1 100644 --- a/kdbg/dbgdriver.cpp +++ b/kdbg/dbgdriver.cpp @@ -220,12 +220,12 @@ void DebuggerDriver::writeCommand() m_activeCmd = cmd; TRACE("in writeCommand: " + cmd->m_cmdString); - const char* str = cmd->m_cmdString; - writeStdin(const_cast(str), cmd->m_cmdString.length()); + const char* str = cmd->m_cmdString.local8Bit(); + writeStdin(str, cmd->m_cmdString.local8Bit().length()); // write also to log file if (m_logFile.isOpen()) { - m_logFile.writeBlock(str, cmd->m_cmdString.length()); + m_logFile.writeBlock(str, cmd->m_cmdString.local8Bit().length()); m_logFile.flush(); } diff --git a/kdbg/dbgmainwnd.cpp b/kdbg/dbgmainwnd.cpp index 9576270..06efadd 100644 --- a/kdbg/dbgmainwnd.cpp +++ b/kdbg/dbgmainwnd.cpp @@ -224,7 +224,7 @@ void DebuggerMainWnd::initKAction() for (unsigned i = 0; i < sizeof(dw)/sizeof(dw[0]); i++) { KDockWidget* d = dockParent(dw[i].w); (void)new TDEToggleAction(dw[i].text, 0, d, SLOT(changeHideShowState()), - actionCollection(), dw[i].id); + actionCollection(), dw[i].id.latin1()); } @@ -485,7 +485,7 @@ void DebuggerMainWnd::updateUI() void DebuggerMainWnd::dockUpdateHelper(TQString action, TQWidget* w) { TDEToggleAction* item = - static_cast(actionCollection()->action(action)); + static_cast(actionCollection()->action(action.latin1())); bool canChange = canChangeDockVisibility(w); item->setEnabled(canChange); item->setChecked(canChange && isDockVisible(w)); diff --git a/kdbg/memwindow.cpp b/kdbg/memwindow.cpp index 06a4384..4d2aac2 100644 --- a/kdbg/memwindow.cpp +++ b/kdbg/memwindow.cpp @@ -265,7 +265,7 @@ void MemoryWindow::saveProgramSpecific(TDEConfigBase* config) for (int i = 0; i < 2; i++) { int w = m_memory.columnWidth(i); wStr.setNum(w); - widths.append(wStr); + widths.append(wStr.latin1()); } config->writeEntry(ColumnWidths, widths); } -- cgit v1.2.1