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 6ca21693d5)
r14.0.x
Slávek Banko 6 years ago
parent f26c3dbf10
commit 352e815749
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -58,7 +58,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings ###### 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_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )

@ -36,7 +36,7 @@ KCleanup::KCleanup( TQString id,
: TDEAction( title, : TDEAction( title,
0, // accel 0, // accel
parent, parent,
id ) id.utf8() )
, _id ( id ) , _id ( id )
, _command ( command ) , _command ( command )
@ -312,9 +312,9 @@ KCleanup::expandVariables( const KFileInfo * item,
TQString expanded = unexpanded; TQString expanded = unexpanded;
expanded.replace( TQRegExp( "%p" ), expanded.replace( TQRegExp( "%p" ),
"\"" + TQString::fromLocal8Bit( item->url() ) + "\"" ); "\"" + item->url() + "\"" );
expanded.replace( TQRegExp( "%n" ), expanded.replace( TQRegExp( "%n" ),
"\"" + TQString::fromLocal8Bit( item->name() ) + "\"" ); "\"" + item->name() + "\"" );
if ( KDE::versionMajor() >= 3 && KDE::versionMinor() >= 4 ) if ( KDE::versionMajor() >= 3 && KDE::versionMinor() >= 4 )
expanded.replace( TQRegExp( "%t" ), "trash:/" ); expanded.replace( TQRegExp( "%t" ), "trash:/" );

@ -49,7 +49,7 @@ KDirSaver::cd( const TQString & newPath )
{ {
if ( ! newPath.isEmpty() ) if ( ! newPath.isEmpty() )
{ {
chdir( newPath ); chdir( newPath.local8Bit() );
} }
} }
@ -64,7 +64,7 @@ KDirSaver::currentDirPath() const
void void
KDirSaver::restore() KDirSaver::restore()
{ {
chdir( oldWorkingDir.path() ); chdir( oldWorkingDir.path().local8Bit() );
} }

@ -524,7 +524,7 @@ void
KDirStatApp::editCopy() KDirStatApp::editCopy()
{ {
if ( _treeView->selection() ) if ( _treeView->selection() )
kapp->clipboard()->setText( TQString::fromLocal8Bit(_treeView->selection()->orig()->url()) ); kapp->clipboard()->setText(_treeView->selection()->orig()->url());
#if 0 #if 0
#warning debug #warning debug
@ -568,7 +568,7 @@ KDirStatApp::selectionChanged( KFileInfo *selection )
else else
_fileContinueReadingAtMountPoint->setEnabled( false ); _fileContinueReadingAtMountPoint->setEnabled( false );
statusMsg( TQString::fromLocal8Bit(selection->url()) ); statusMsg(selection->url());
} }
else else
{ {

@ -859,7 +859,7 @@ KLocalDirReadJob::startReading()
struct stat statInfo; struct stat statInfo;
TQString dirName = _dir->url(); TQString dirName = _dir->url();
if ( ( _diskDir = opendir( dirName ) ) ) if ( ( _diskDir = opendir( dirName.local8Bit() ) ) )
{ {
_tree->sendProgressInfo( dirName ); _tree->sendProgressInfo( dirName );
_dir->setReadState( KDirReading ); _dir->setReadState( KDirReading );
@ -873,7 +873,7 @@ KLocalDirReadJob::startReading()
{ {
TQString fullName = dirName + "/" + entryName; TQString fullName = dirName + "/" + entryName;
if ( lstat( fullName, &statInfo ) == 0 ) // lstat() OK if ( lstat( fullName.local8Bit(), &statInfo ) == 0 ) // lstat() OK
{ {
if ( S_ISDIR( statInfo.st_mode ) ) // directory child? if ( S_ISDIR( statInfo.st_mode ) ) // directory child?
{ {
@ -957,7 +957,7 @@ KLocalDirReadJob::stat( const KURL & url,
{ {
struct stat statInfo; struct stat statInfo;
if ( lstat( url.path(), &statInfo ) == 0 ) // lstat() OK if ( lstat( url.path().local8Bit(), &statInfo ) == 0 ) // lstat() OK
{ {
TQString name = parent ? url.filename() : url.path(); TQString name = parent ? url.filename() : url.path();

@ -1010,7 +1010,7 @@ KDirTreeViewItem::init( KDirTreeView * view,
} }
else else
{ {
setText( view->nameCol(), TQString::fromLocal8Bit(_orig->name()) ); setText( view->nameCol(), _orig->name() );
if ( ! _orig->isDevice() ) if ( ! _orig->isDevice() )
{ {
@ -1526,9 +1526,9 @@ KDirTreeViewItem::asciiDump()
{ {
TQString dump; TQString dump;
dump.sprintf( "%10s %s\n", dump = TQString("%1 %2\n")
(const char *) formatSize( _orig->totalSize() ), .arg(formatSize(_orig->totalSize()), 10)
(const char *) _orig->debugUrl() ); .arg(_orig->debugUrl().local8Bit());
if ( isOpen() ) if ( isOpen() )
{ {

Loading…
Cancel
Save