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>
pull/1/head
Slávek Banko 6 vuotta sitten
vanhempi 76fb9f0887
commit 6ca21693d5
Allekirjoittanut: SlavekB
GPG avaimen ID: 608F5293A04BE668

@ -58,7 +58,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 "-Wl,--no-undefined" )

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

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

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

@ -859,7 +859,7 @@ KLocalDirReadJob::startReading()
struct stat statInfo;
TQString dirName = _dir->url();
if ( ( _diskDir = opendir( dirName ) ) )
if ( ( _diskDir = opendir( dirName.local8Bit() ) ) )
{
_tree->sendProgressInfo( dirName );
_dir->setReadState( KDirReading );
@ -873,7 +873,7 @@ KLocalDirReadJob::startReading()
{
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?
{
@ -957,7 +957,7 @@ KLocalDirReadJob::stat( const KURL & url,
{
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();

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

Ladataan…
Peruuta
Tallenna