TQString related changes required for cmake conversion

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 43c7061c61)
r14.1.x
Michele Calgaro 12 months ago
parent cdd07aa722
commit 3b8edca5ad
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -102,7 +102,7 @@ const TQString &Smb4TDEGlobalPrivate::tempDir()
{ {
Smb4KError::error( ERROR_CREATING_TEMP_DIR, tmpd_name, strerror( errno ) ); Smb4KError::error( ERROR_CREATING_TEMP_DIR, tmpd_name, strerror( errno ) );
return TQString(); return TQString::null;
} }
m_temp_dir = TQString( tmpd_name ); m_temp_dir = TQString( tmpd_name );

@ -369,18 +369,18 @@ void Smb4KMounter::import()
if ( (!new_share->isBroken() && if ( (!new_share->isBroken() &&
(tqstrncmp( new_share->canonicalPath(), (tqstrncmp( new_share->canonicalPath(),
TQDir( Smb4KSettings::mountPrefix() ).canonicalPath(), TQDir( Smb4KSettings::mountPrefix() ).canonicalPath().local8Bit(),
TQDir( Smb4KSettings::mountPrefix() ).canonicalPath().length() ) == 0 || TQDir( Smb4KSettings::mountPrefix() ).canonicalPath().local8Bit().length() ) == 0 ||
tqstrncmp( new_share->canonicalPath(), tqstrncmp( new_share->canonicalPath(),
TQDir::home().canonicalPath(), TQDir::home().canonicalPath().local8Bit(),
TQDir::home().canonicalPath().length() ) == 0)) || TQDir::home().canonicalPath().local8Bit().length() ) == 0)) ||
(new_share->isBroken() && (new_share->isBroken() &&
(tqstrncmp( new_share->path(), (tqstrncmp( new_share->path(),
TQDir::homeDirPath(), TQDir::homeDirPath().local8Bit(),
TQDir::homeDirPath().length() ) == 0 || TQDir::homeDirPath().local8Bit().length() ) == 0 ||
tqstrncmp( new_share->path(), tqstrncmp( new_share->path(),
Smb4KSettings::mountPrefix(), Smb4KSettings::mountPrefix().local8Bit(),
Smb4KSettings::mountPrefix().length() ) == 0)) ) Smb4KSettings::mountPrefix().local8Bit().length() ) == 0)) )
{ {
foreign = false; foreign = false;
} }
@ -1053,7 +1053,7 @@ void Smb4KMounter::processMount()
#endif #endif
#if !defined(__sun) && !defined(__irix__) #if !defined(__sun) && !defined(__irix__)
if ( statfs( m_priv->path(), &filesystem ) == -1 ) if ( statfs( m_priv->path().local8Bit(), &filesystem ) == -1 )
#elif defined(__irix__) #elif defined(__irix__)
if ( statfs( m_priv->path(), &filesystem, sizeof( filesystem ), 0 ) == -1 ) if ( statfs( m_priv->path(), &filesystem, sizeof( filesystem ), 0 ) == -1 )
#else #else
@ -1588,12 +1588,13 @@ void Smb4KMounter::slotShutdown()
for ( TQValueListIterator<Smb4KShare *> bs = broken_shares.begin(); bs != broken_shares.end(); ++bs ) for ( TQValueListIterator<Smb4KShare *> bs = broken_shares.begin(); bs != broken_shares.end(); ++bs )
{ {
TQString path = Smb4KSettings::mountPrefix()+*it;
if ( tqstrncmp( (*bs)->path(), if ( tqstrncmp( (*bs)->path(),
Smb4KSettings::mountPrefix()+*it, path.local8Bit(),
(Smb4KSettings::mountPrefix()+*it).length() ) == 0 || path.local8Bit().length() ) == 0 ||
tqstrncmp( (*bs)->canonicalPath(), tqstrncmp( (*bs)->canonicalPath(),
Smb4KSettings::mountPrefix()+*it, path.local8Bit(),
(Smb4KSettings::mountPrefix()+*it).length() ) == 0 ) path.local8Bit().length() ) == 0 )
{ {
broken = true; broken = true;

@ -261,7 +261,7 @@ void Smb4KApp::setupView()
createGUI( m_shares_part ); createGUI( m_shares_part );
accel()->insert( i18n( "Jump to shares view" ), CTRL+Key_3, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSharesView() ), false, true ); accel()->insert( i18n( "Jump to shares view" ).utf8().data(), CTRL+Key_3, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSharesView() ), false, true );
} }
} }
else else
@ -290,7 +290,7 @@ void Smb4KApp::setupView()
factory()->addClient( m_browser_part ); factory()->addClient( m_browser_part );
accel()->insert( i18n( "Jump to network browser" ), CTRL+Key_1, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToNetworkBrowser() ), false, true ); accel()->insert( i18n( "Jump to network browser" ).utf8().data(), CTRL+Key_1, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToNetworkBrowser() ), false, true );
} }
} }
else else
@ -329,7 +329,7 @@ void Smb4KApp::setupView()
factory()->addClient( m_search_part ); factory()->addClient( m_search_part );
accel()->insert( i18n( "Jump to search dialog" ), CTRL+Key_2, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSearchDialog() ), false, true ); accel()->insert( i18n( "Jump to search dialog" ).utf8().data(), CTRL+Key_2, TQT_TQOBJECT(this), TQT_SLOT( slotJumpToSearchDialog() ), false, true );
} }
} }
else else
@ -886,7 +886,7 @@ void Smb4KApp::slotSetupBookmarksMenu()
for ( TQStringList::ConstIterator it = display_strings.begin(); it != display_strings.end(); ++it ) for ( TQStringList::ConstIterator it = display_strings.begin(); it != display_strings.end(); ++it )
{ {
TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), *it ); TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), (*it).utf8() );
a->setGroup( "Bookmarks" ); a->setGroup( "Bookmarks" );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( slotBookmarkActivated() ) ); connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( slotBookmarkActivated() ) );
bookmark_list.append( a ); bookmark_list.append( a );

@ -289,7 +289,7 @@ void Smb4KSystemTray::slotSetupBookmarksMenu()
for ( TQStringList::ConstIterator it = display_strings.begin(); it != display_strings.end(); ++it ) for ( TQStringList::ConstIterator it = display_strings.begin(); it != display_strings.end(); ++it )
{ {
// Create the bookmark action: // Create the bookmark action:
TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), "st_"+*it ); TDEAction *a = new TDEAction( *it, "folder", TDEShortcut::null(), 0, 0, actionCollection(), ("st_"+*it).utf8() );
a->setGroup( "Bookmarks" ); a->setGroup( "Bookmarks" );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( slotBookmarkActivated() ) ); connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( slotBookmarkActivated() ) );
@ -494,7 +494,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
{ {
// Find the "Force Unmount" action and decide if it needs to be // Find the "Force Unmount" action and decide if it needs to be
// enabled/disabled: // enabled/disabled:
TDEAction *force = actionCollection()->action( "st_[force]_"+canonical_path ); TDEAction *force = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( force ) if ( force )
{ {
@ -512,7 +512,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
if ( menu ) if ( menu )
{ {
// Unmount action // Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path ); action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -522,7 +522,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__ #ifdef __linux__
// Force Unmount action // Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path ); action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -532,7 +532,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif #endif
// Synchronize action // Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path ); action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -541,7 +541,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konsole action // Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path ); action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -550,7 +550,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konqueror action // Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path ); action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -575,7 +575,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
if ( menu ) if ( menu )
{ {
// Unmount action // Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path ); action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -585,7 +585,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__ #ifdef __linux__
// Force Unmount action // Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path ); action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -595,7 +595,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif #endif
// Synchronize action // Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path ); action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -604,7 +604,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konsole action // Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path ); action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -613,7 +613,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konqueror action // Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path ); action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -638,7 +638,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
if ( menu ) if ( menu )
{ {
// Unmount action // Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path ); action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -648,7 +648,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__ #ifdef __linux__
// Force Unmount action // Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path ); action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -658,7 +658,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif #endif
// Synchronize action // Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path ); action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -667,7 +667,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konsole action // Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path ); action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -676,7 +676,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konqueror action // Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path ); action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -866,9 +866,9 @@ void Smb4KSystemTray::slotSetupSharesMenu()
// Disable actions that should not be performed on an inaccessible // Disable actions that should not be performed on an inaccessible
// share: // share:
actionCollection()->action( TQString("st_[synchronize]_"+(*it)->canonicalPath()) )->setEnabled( false ); actionCollection()->action( TQString("st_[synchronize]_"+(*it)->canonicalPath()).utf8() )->setEnabled( false );
actionCollection()->action( TQString("st_[konsole]_"+(*it)->canonicalPath()) )->setEnabled( false ); actionCollection()->action( TQString("st_[konsole]_"+(*it)->canonicalPath()).utf8() )->setEnabled( false );
actionCollection()->action( TQString("st_[filemanager]_"+(*it)->canonicalPath()) )->setEnabled( false ); actionCollection()->action( TQString("st_[filemanager]_"+(*it)->canonicalPath()).utf8() )->setEnabled( false );
} }
// Change the text if necessary: // Change the text if necessary:
@ -904,7 +904,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
TDEAction *action = NULL; TDEAction *action = NULL;
// Unmount action // Unmount action
action = actionCollection()->action( "st_[unmount]_"+canonical_path ); action = actionCollection()->action( ("st_[unmount]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -914,7 +914,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#ifdef __linux__ #ifdef __linux__
// Force Unmount action // Force Unmount action
action = actionCollection()->action( "st_[force]_"+canonical_path ); action = actionCollection()->action( ("st_[force]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -924,7 +924,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
#endif #endif
// Synchronize action // Synchronize action
action = actionCollection()->action( "st_[synchronize]_"+canonical_path ); action = actionCollection()->action( ("st_[synchronize]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -933,7 +933,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konsole action // Konsole action
action = actionCollection()->action( "st_[konsole]_"+canonical_path ); action = actionCollection()->action( ("st_[konsole]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {
@ -942,7 +942,7 @@ void Smb4KSystemTray::slotSetupSharesMenu()
} }
// Konqueror action // Konqueror action
action = actionCollection()->action( "st_[filemanager]_"+canonical_path ); action = actionCollection()->action( ("st_[filemanager]_"+canonical_path).utf8() );
if ( action ) if ( action )
{ {

Loading…
Cancel
Save