diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-01-05 14:59:47 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-01-05 15:00:20 +0100 |
commit | aaa6171d35da76573357868b0607dfff2f71db46 (patch) | |
tree | 11834c2e0f445630887354cbee68b5318fa8170d | |
parent | 4b34b71923672a32f25ef5ef573e23645a6da67f (diff) | |
download | knights-aaa6171d35da76573357868b0607dfff2f71db46.tar.gz knights-aaa6171d35da76573357868b0607dfff2f71db46.zip |
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 9e120e0d4bd46ebc619390f23ef874542f6548cf)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | knights/io_internet.cpp | 12 | ||||
-rw-r--r-- | knights/list_pgn.cpp | 2 | ||||
-rw-r--r-- | knights/resource.cpp | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c232807..0327668 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,7 @@ include( ConfigureChecks.cmake ) ###### global compiler settings -add_definitions( -DHAVE_CONFIG_H -UQT_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/knights/io_internet.cpp b/knights/io_internet.cpp index e29888c..b5cbaa6 100644 --- a/knights/io_internet.cpp +++ b/knights/io_internet.cpp @@ -187,7 +187,7 @@ void io_internet::connectToServer() } else { - socket = new TDESocket(myServer->URL, myServer->Port, 30); + socket = new TDESocket(myServer->URL.utf8(), myServer->Port, 30); if(socket->socket() == -1) { /* Couldn't connect to server. Notify User and die gracefully */ @@ -221,7 +221,7 @@ void io_internet::connectToServer() and close these tabs at will, or have multiple open at once. ALL communication to our tabs needs to be done with SIGNALS & SLOTS to facilitate this. */ - consoleTab = new Console( 0, myServer->Name, myResource ); + consoleTab = new Console( 0, myServer->Name.utf8(), myResource ); myTabList[consoleTab] = consoleTab; myResource->tabManager->addTab( myTabList[consoleTab], i18n( "%1 Console" ).arg( myServer->Name ) ); connect( myTabList[consoleTab], TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( recvCMD( const Command& ) ) ); @@ -847,9 +847,9 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode) } /* Verbose Coordinate Notation of previous move ( USE AS CAN ) */ - strcpy(move.CAN, fields[27].right(fields[27].length() - 2).replace(TQRegExp("-"), "")); + strcpy(move.CAN, fields[27].right(fields[27].length() - 2).replace(TQRegExp("-"), "").utf8()); /* SAN */ - strcpy(move.SAN, fields[29].replace(TQRegExp("\\+"), "").replace(TQRegExp("#"), "")); + strcpy(move.SAN, fields[29].replace(TQRegExp("\\+"), "").replace(TQRegExp("#"), "").utf8()); /* fill the line for the command */ position_line += fields[1]; /* Internal Rank #7 */ @@ -1024,7 +1024,7 @@ void io_internet::parseMoveList(TQString line) move.ICS_MoveCounter = move_counter; move.ICS_Mode = ICS_Movelist; move.ICS_OnMove = WHITE; - strcpy(move.SAN, two_plys[1]); + strcpy(move.SAN, two_plys[1].utf8()); command.setCommand((int&)CMD_Move); command.setID(fics_to_knights[ficsMoveListNumber]); command.setMove(move); @@ -1037,7 +1037,7 @@ void io_internet::parseMoveList(TQString line) move.ICS_MoveCounter = move_counter; move.ICS_Mode = ICS_Movelist; move.ICS_OnMove = BLACK; - strcpy(move.SAN, two_plys[3]); + strcpy(move.SAN, two_plys[3].utf8()); command.setCommand((int&)CMD_Move); command.setID(fics_to_knights[ficsMoveListNumber]); command.setMove(move); diff --git a/knights/list_pgn.cpp b/knights/list_pgn.cpp index 371da24..f1dfc22 100644 --- a/knights/list_pgn.cpp +++ b/knights/list_pgn.cpp @@ -140,6 +140,6 @@ void list_pgn::timerEvent( TQTimerEvent* ) tmpPGN.TAG_Site, tmpPGN.TAG_Date, TQString::number(tmpPGN.File_Position) ); - status->message( i18n( TQString( "%1 matches found." ).arg( listView->childCount() ) ) ); + status->message( i18n( "%1 matches found." ).arg( listView->childCount() ) ); } } diff --git a/knights/resource.cpp b/knights/resource.cpp index c191c11..aa8ec21 100644 --- a/knights/resource.cpp +++ b/knights/resource.cpp @@ -164,7 +164,7 @@ void resource::ConfigRead( void ) PGN_Filename = CFG->readEntry( "PGNFilename", TQString() ); SCID_Image_Path = CFG->readEntry( "SCIDImages", TQString() ); OPTION_Auto_Close_Last_ICS = CFG->readBoolEntry( "AutoCloseLastICS", TRUE ); - OPTION_Show_Extended_PGN = CFG->readEntry( "ShowExtendedPGN", FALSE ); + OPTION_Show_Extended_PGN = CFG->readBoolEntry( "ShowExtendedPGN", FALSE ); OPTION_Auto_Call_Flag = CFG->readBoolEntry( "AutoCallFlag", TRUE ); Email_Command_Line = CFG->readEntry( "EmailCommandLine", TQString("kmail -s %s --attach %m %a") ); Accepted_License = CFG->readBoolEntry( "Alg2p", FALSE ); |