Compare commits

...

64 Commits

Author SHA1 Message Date
  TDE Gitea b14926a630 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 week ago
  TDE Gitea abd2fec022 Reset submodule main/applications/smb4k/admin to latest HEAD 1 week ago
  TDE Gitea 0bbcf81446 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 week ago
  TDE Gitea 63896bd8c6 Reset submodule main/applications/smb4k/admin to latest HEAD 1 week ago
  TDE Gitea 832d4c2f74 Reset submodule main/applications/smb4k/cmake to latest HEAD 2 months ago
  TDE Gitea a0e7772ce7 Reset submodule main/applications/smb4k/cmake to latest HEAD 3 months ago
  TDE Gitea 8b34dfe692 Reset submodule main/applications/smb4k/cmake to latest HEAD 3 months ago
  TDE Gitea efbf83c696 Reset submodule main/applications/smb4k/admin to latest HEAD 3 months ago
  TDE Gitea 79a0b2bf94 Reset submodule main/applications/smb4k/cmake to latest HEAD 3 months ago
  TDE Gitea fe4d879486 Reset submodule main/applications/smb4k/cmake to latest HEAD 3 months ago
  TDE Gitea 58ffa2282e Reset submodule main/applications/smb4k/cmake to latest HEAD 3 months ago
  TDE Gitea 4e1981d922 Reset submodule main/applications/smb4k/cmake to latest HEAD 3 months ago
  TDE Gitea f79076448c Reset submodule main/applications/smb4k/admin to latest HEAD 3 months ago
  TDE Gitea b8e2e1fc84 Reset submodule main/applications/smb4k/cmake to latest HEAD 4 months ago
  TDE Gitea dd13dcadb9 Reset submodule main/applications/smb4k/cmake to latest HEAD 4 months ago
  TDE Gitea b3d4347c95 Reset submodule main/applications/smb4k/cmake to latest HEAD 4 months ago
  TDE Gitea df3be84f86 Reset submodule main/applications/smb4k/cmake to latest HEAD 4 months ago
  TDE Gitea 8076ee7435 Reset submodule main/applications/smb4k/cmake to latest HEAD 4 months ago
  TDE Gitea 5ba726db34 Reset submodule main/applications/smb4k/cmake to latest HEAD 5 months ago
  TDE Gitea f27652f3ad Reset submodule main/applications/smb4k/cmake to latest HEAD 5 months ago
  TDE Gitea d740a99415 Reset submodule main/applications/smb4k/cmake to latest HEAD 6 months ago
  TDE Gitea e4db2c4468 Reset submodule main/applications/smb4k/cmake to latest HEAD 9 months ago
  Slávek Banko 0873672141
Switch all submodules to https. 9 months ago
  TDE Gitea 4e42c5cc60 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 8ec5190d67 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 27fb6b9429 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 7b1d0274d9 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 262cc729cd Reset submodule main/applications/smb4k/admin to latest HEAD 1 year ago
  TDE Gitea c25db947c6 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 3a2a9f7357 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea f3227a7465 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 30a596078b Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea e94c0f5de8 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea eea3972e8b Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 9d5d20c0a4 Reset submodule main/applications/smb4k/admin to latest HEAD 1 year ago
  TDE Gitea 1279cf2651 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 0840e51d19 Reset submodule main/applications/smb4k/cmake to latest HEAD 1 year ago
  TDE Gitea 7ae1de0b79 Reset submodule main/applications/smb4k/admin to latest HEAD 2 years ago
  Slávek Banko 90d4f0c687 Reset submodule main/applications/smb4k/admin to latest HEAD 2 years ago
  Slávek Banko 602d9330bb Reset submodule main/applications/smb4k/admin to latest HEAD 2 years ago
  Slávek Banko da6daf2b07 Reset submodule main/applications/smb4k/admin to latest HEAD 2 years ago
  Slávek Banko 2ee7100624 Reset submodule main/applications/smb4k/cmake to latest HEAD 3 years ago
  Slávek Banko 03fae44413 Reset submodule main/applications/smb4k/admin to latest HEAD 4 years ago
  Slávek Banko f5f0cd9be0 Reset submodule main/applications/smb4k/cmake to latest HEAD 4 years ago
  Slávek Banko ea27dd28c1 Reset submodule main/applications/smb4k/admin to latest HEAD 4 years ago
  Slávek Banko 8bad989dc9 Reset submodule main/applications/smb4k/admin to latest HEAD 7 years ago
  Slávek Banko bc89f323c7 Reset submodule main/applications/smb4k/admin to latest HEAD 7 years ago
  Slávek Banko 4c1cf5b971 Reset submodule main/applications/smb4k/cmake to latest HEAD 7 years ago
  Slávek Banko 10d93a1bb2 Reset submodule main/applications/smb4k/cmake to latest HEAD 7 years ago
  Darrell Anderson fef5bca401 Fix references to user profile directory. 8 years ago
  Darrell Anderson cf2d17d731 Fix inadvertent tqt changes. 8 years ago
  Slávek Banko 8d2310eed3 Reset submodule main/applications/smb4k/cmake to latest HEAD 7 years ago
  Slávek Banko 0c03a37e54 Reset submodule main/applications/smb4k/cmake to latest HEAD 7 years ago
  Slávek Banko dab61f841e Reset submodule main/applications/smb4k/admin to latest HEAD 7 years ago
  Slávek Banko 7f062b6f8a Reset submodule main/applications/smb4k/cmake to latest HEAD 8 years ago
  Slávek Banko 982e8fd8dd Reset submodule main/applications/smb4k/cmake to latest HEAD 8 years ago
  Slávek Banko 140c266526 Reset submodule main/applications/smb4k/admin to latest HEAD 8 years ago
  Slávek Banko 92dc24bbe3 Update final HTML install path so all modules are consistent. 8 years ago
  Darrell Anderson 659dc4430b Update HTML install path references. 8 years ago
  Darrell Anderson 414388acbe GCC 4.7 fixes. 8 years ago
  Timothy Pearson abff5481ca Rename obsolete tq methods to standard names 8 years ago
  Timothy Pearson 752f91a35a Remove additional unneeded tq method conversions 8 years ago
  Timothy Pearson 3bef9268f9 Rename old tq methods that no longer need a unique name 8 years ago
  Slávek Banko 7eba4a9abc Add common directories 8 years ago
45 changed files with 787 additions and 778 deletions
Split View
  1. +6
    -0
      .gitmodules
  2. +1
    -1
      TODO
  3. +1
    -1
      acinclude.m4
  4. +1
    -0
      admin
  5. +1
    -0
      cmake
  6. +1
    -1
      doc/en/index.docbook
  7. +5
    -5
      plugin/smb4k_konqplugin.cpp
  8. +6
    -6
      smb4k/browser/smb4knetworkbrowser_part.cpp
  9. +1
    -1
      smb4k/browser/smb4knetworkbrowser_part.h
  10. +1
    -1
      smb4k/browser/smb4knetworkbrowsertooltip.h
  11. +4
    -4
      smb4k/configdlg/smb4kconfigdialog.cpp
  12. +6
    -6
      smb4k/configdlg/smb4ksambaoptions.cpp
  13. +2
    -1
      smb4k/configdlg/smb4kshareoptions.cpp
  14. +3
    -3
      smb4k/core/smb4kbookmark.cpp
  15. +1
    -1
      smb4k/core/smb4kbookmarkhandler.cpp
  16. +1
    -1
      smb4k/core/smb4kcore.cpp
  17. +30
    -30
      smb4k/core/smb4kerror.cpp
  18. +11
    -11
      smb4k/core/smb4kfileio.cpp
  19. +8
    -8
      smb4k/core/smb4khomesshareshandler.cpp
  20. +53
    -53
      smb4k/core/smb4kmounter.cpp
  21. +16
    -16
      smb4k/core/smb4kpasswordhandler.cpp
  22. +4
    -4
      smb4k/core/smb4kpreviewer.cpp
  23. +9
    -9
      smb4k/core/smb4kprint.cpp
  24. +39
    -39
      smb4k/core/smb4ksambaoptionshandler.cpp
  25. +1
    -1
      smb4k/core/smb4ksambaoptionsinfo.cpp
  26. +23
    -23
      smb4k/core/smb4kscanner.cpp
  27. +419
    -419
      smb4k/core/smb4ksettings.cpp
  28. +6
    -6
      smb4k/core/smb4ksynchronizer.cpp
  29. +4
    -4
      smb4k/dialogs/smb4kbookmarkeditor.cpp
  30. +8
    -8
      smb4k/dialogs/smb4kcustomoptionsdialog.cpp
  31. +11
    -11
      smb4k/dialogs/smb4kmountdialog.cpp
  32. +8
    -8
      smb4k/dialogs/smb4kpreviewdialog.cpp
  33. +5
    -5
      smb4k/dialogs/smb4kprintdialog.cpp
  34. +13
    -13
      smb4k/dialogs/smb4ksynchronizationdialog.cpp
  35. +21
    -21
      smb4k/iconview/smb4ksharesiconviewtooltip.cpp
  36. +1
    -1
      smb4k/iconview/smb4ksharesiconviewtooltip.h
  37. +1
    -1
      smb4k/listview/smb4kshareslistview.cpp
  38. +20
    -20
      smb4k/listview/smb4kshareslistviewitem.cpp
  39. +2
    -2
      smb4k/listview/smb4kshareslistviewitem.h
  40. +21
    -21
      smb4k/listview/smb4kshareslistviewtooltip.cpp
  41. +1
    -1
      smb4k/listview/smb4kshareslistviewtooltip.h
  42. +1
    -1
      smb4k/main.cpp
  43. +4
    -4
      smb4k/searchdlg/smb4ksearchdialog.cpp
  44. +2
    -2
      smb4k/smb4k.cpp
  45. +4
    -4
      smb4k/smb4ksystemtray.cpp

+ 6
- 0
.gitmodules View File

@@ -0,0 +1,6 @@
[submodule "admin"]
path = admin
url = https://system@scm.trinitydesktop.org/scm/git/tde-common-admin
[submodule "cmake"]
path = cmake
url = https://system@scm.trinitydesktop.org/scm/git/tde-common-cmake

+ 1
- 1
TODO View File

@@ -26,7 +26,7 @@ for 0.10.x:
- If "default" options have been defined for Samba commands, they should not
appear in the command.
- Don't save information about foreign shares and about shares that only
use default values in ~/.kde/share/apps/smb4k/custom_options file.
use default values in ~/.trinity/share/apps/smb4k/custom_options file.
- Rewrite Smb4KSambaOptionsHandler::netOptions().
- Allow more than one file manager.
- Implement scripting functionality (D-BUS/DCOP(?)).


+ 1
- 1
acinclude.m4 View File

@@ -428,7 +428,7 @@ AC_DEFUN([KDE_SET_DEFAULT_PATHS],
if test "$1" = "default"; then

if test -z "$kde_htmldir"; then
kde_htmldir='\${datadir}/doc/HTML'
kde_htmldir='\${datadir}/doc/tde/HTML'
fi
if test -z "$kde_appsdir"; then
kde_appsdir='\${datadir}/applnk'


+ 1
- 0
admin

@@ -0,0 +1 @@
Subproject commit 9c3a708c04ab11ee9bc511e7fb90b59db5eecf22

+ 1
- 0
cmake

@@ -0,0 +1 @@
Subproject commit adf1b92de6227b1d277e2cc89e70286acd205c39

+ 1
- 1
doc/en/index.docbook View File

@@ -129,7 +129,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<para>If all programs have been found, the main window and the system tray widget will be shown and you can start working with &smb4k;.</para>
<para><emphasis role="bold">Note:</emphasis> It is recommended that you configure Samba before using &smb4k;. The <ulink url="man:/swat"><citerefentry><refentrytitle>swat</refentrytitle><manvolnum>8</manvolnum></citerefentry></ulink> utility can be used for this purpose. It is part of the Samba software suite and provides an easy-to-use web interface. See its manual page for documentation.</para>

<para>Starting with version 0.9.0, &smb4k; uses the KConfig XT configuration system. All previously defined settings are obsolete. To assure a clean transition the old configuration file <filename>$HOME/.kde/share/config/smb4krc</filename> will be removed the first time you start the new version of &smb4k;. A message box will warn you before the file is actually removed:</para>
<para>Starting with version 0.9.0, &smb4k; uses the KConfig XT configuration system. All previously defined settings are obsolete. To assure a clean transition the old configuration file <filename>$HOME/.trinity/share/config/smb4krc</filename> will be removed the first time you start the new version of &smb4k;. A message box will warn you before the file is actually removed:</para>

<screenshot>
<screeninfo>Warning message box</screeninfo>


+ 5
- 5
plugin/smb4k_konqplugin.cpp View File

@@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2004 by Massimo Callegari *
* massitqmocallegari@yahoo.it *
* massimocallegari@yahoo.it *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -155,10 +155,10 @@ void KonqSidebar_Smb4K::slotSearch()

if ( m_search_part )
{
TQGridLayout *tqlayout = new TQGridLayout( frame );
tqlayout->setSpacing( 10 );
tqlayout->setMargin( 0 );
tqlayout->addWidget ( m_search_part->widget(), 0, 0, 0 );
TQGridLayout *layout = new TQGridLayout( frame );
layout->setSpacing( 10 );
layout->setMargin( 0 );
layout->addWidget ( m_search_part->widget(), 0, 0, 0 );
searchDialog->resize(400,300);
// We do not want the dialog to be closed if the user presses return.
// Instead we want that a search is started:


+ 6
- 6
smb4k/browser/smb4knetworkbrowser_part.cpp View File

@@ -619,7 +619,7 @@ void Smb4KNetworkBrowserPart::slotItemCollapsed( TQListViewItem *item )
{
Smb4KNetworkBrowserItem *browser_item = static_cast<Smb4KNetworkBrowserItem *>( item );

// Remove all tqchildren if we have a host item, because we
// Remove all children if we have a host item, because we
// do not want shares already displayed before the user provided
// the login data.
if ( browser_item && browser_item->type() == Smb4KNetworkBrowserItem::Host )
@@ -903,7 +903,7 @@ void Smb4KNetworkBrowserPart::slotWorkgroupMembers( const TQString &workgroup, c
}
else
{
// Add the tqchildren to the childless host item:
// Add the children to the childless host item:
for ( TQValueList<Smb4KHostItem *>::ConstIterator it = list.begin(); it != list.end(); ++it )
{
// In case the whole list of known hosts is emitted by the scanner,
@@ -1151,7 +1151,7 @@ void Smb4KNetworkBrowserPart::slotShares( const TQString &host, const TQValueLis
}
else
{
// Add the tqchildren to the childless host item:
// Add the children to the childless host item:
for ( TQValueList<Smb4KShareItem *>::ConstIterator it = list.begin(); it != list.end(); ++it )
{
// Respect the settings the user chose to use:
@@ -1331,7 +1331,7 @@ void Smb4KNetworkBrowserPart::slotInsertHost( Smb4KHostItem *item )
if ( workgroup_item )
{
// Check if the host item is already there. We traverse
// workgroup's tqchildren for that:
// workgroup's children for that:
Smb4KNetworkBrowserItem *host_item = static_cast<Smb4KNetworkBrowserItem *>( workgroup_item->firstChild() );

while ( host_item )
@@ -1676,7 +1676,7 @@ void Smb4KNetworkBrowserPart::slotUnmount()
if ( browser_item && browser_item->type() == Smb4KNetworkBrowserItem::Share &&
browser_item->isMounted() )
{
TQString share_name = TQString( "//%1/%2" ).tqarg( browser_item->shareItem()->host(),
TQString share_name = TQString( "//%1/%2" ).arg( browser_item->shareItem()->host(),
browser_item->shareItem()->name() );

TQValueList<Smb4KShare> list = Smb4KCore::mounter()->findShareByName( share_name );
@@ -1729,7 +1729,7 @@ void Smb4KNetworkBrowserPart::slotMarkMountedShares()
{
Smb4KShareItem *share_item = static_cast<Smb4KNetworkBrowserItem *>( item )->shareItem();

TQValueList<Smb4KShare> list = Smb4KCore::mounter()->findShareByName( TQString( "//%1/%2" ).tqarg( share_item->host(), share_item->name() ) );
TQValueList<Smb4KShare> list = Smb4KCore::mounter()->findShareByName( TQString( "//%1/%2" ).arg( share_item->host(), share_item->name() ) );

if ( list.isEmpty() )
{


+ 1
- 1
smb4k/browser/smb4knetworkbrowser_part.h View File

@@ -185,7 +185,7 @@ class Smb4KNetworkBrowserPart : public KParts::Part

/**
* This slot receives the list of shared resources a host provides. It takes
* this @p list and inserts its items as tqchildren of @p host into the list
* this @p list and inserts its items as children of @p host into the list
* view. Obsolete items will be deleted from the network browser.
*
* @param host The host where the shares belong


+ 1
- 1
smb4k/browser/smb4knetworkbrowsertooltip.h View File

@@ -110,7 +110,7 @@ class Smb4KNetworkBrowserToolTip : public TQLabel
Smb4KNetworkBrowserItem *m_item;

/**
* The tqlayout for the tool tip
* The layout for the tool tip
*/
TQGridLayout *m_layout;



+ 4
- 4
smb4k/configdlg/smb4kconfigdialog.cpp View File

@@ -316,8 +316,8 @@ void Smb4KConfigDialog::loadCustomSambaOptions()
item->setText( Smb4KSambaOptions::ItemName, (*it)->itemName() );

item->setText( Smb4KSambaOptions::Port, ((*it)->port() != -1 ?
TQString( "%1" ).tqarg( (*it)->port() ) :
TQString( "%1" ).tqarg( Smb4KSettings::remotePort() )) );
TQString( "%1" ).arg( (*it)->port() ) :
TQString( "%1" ).arg( Smb4KSettings::remotePort() )) );

switch ( (*it)->type() )
{
@@ -905,11 +905,11 @@ bool Smb4KConfigDialog::checkSettings()
{
if ( index == 1 )
{
KMessageBox::error( this, i18n( "The configuration could not be written, because one setting is incomplete:\n%1Please correct this issue." ).tqarg( issues ) );
KMessageBox::error( this, i18n( "The configuration could not be written, because one setting is incomplete:\n%1Please correct this issue." ).arg( issues ) );
}
else
{
KMessageBox::error( this, i18n( "The configuration could not be written, because %1 settings are incomplete:\n%1Please correct these issues." ).tqarg( index ).tqarg( issues ) );
KMessageBox::error( this, i18n( "The configuration could not be written, because %1 settings are incomplete:\n%1Please correct these issues." ).arg( index ).arg( issues ) );
}
}



+ 6
- 6
smb4k/configdlg/smb4ksambaoptions.cpp View File

@@ -126,11 +126,11 @@ Smb4KSambaOptions::Smb4KSambaOptions( TQWidget *parent, const char *name )

(void) new TQLabel( i18n( "User ID:" ), user_group_box );
KLineEdit *user_id = new KLineEdit( user_group_box, "kcfg_UserID" );
user_id->tqsetAlignment( TQt::AlignRight );
user_id->setAlignment( TQt::AlignRight );

(void) new TQLabel( i18n( "Group ID:" ), user_group_box );
KLineEdit *group_id = new KLineEdit( user_group_box, "kcfg_GroupID" );
group_id->tqsetAlignment( TQt::AlignRight );
group_id->setAlignment( TQt::AlignRight );

TQGroupBox *charset_box = new TQGroupBox( 2, Qt::Horizontal,
i18n( "Charset and Codepage" ), mount_tab );
@@ -196,7 +196,7 @@ Smb4KSambaOptions::Smb4KSambaOptions( TQWidget *parent, const char *name )
codepage->insertItem( "cp1256", Smb4KSettings::EnumServerCodepage::cp1256 );
codepage->insertItem( "cp1257", Smb4KSettings::EnumServerCodepage::cp1257 );
codepage->insertItem( "cp1258", Smb4KSettings::EnumServerCodepage::cp1258 );
codepage->insertItem( "tqunicode", Smb4KSettings::EnumServerCodepage::unicode );
codepage->insertItem( "unicode", Smb4KSettings::EnumServerCodepage::unicode );

TQGroupBox *perms_box = new TQGroupBox( 2, Qt::Horizontal,
i18n( "Permissions" ), mount_tab );
@@ -204,11 +204,11 @@ Smb4KSambaOptions::Smb4KSambaOptions( TQWidget *parent, const char *name )

(void) new TQLabel( i18n( "File mask:" ), perms_box );
KLineEdit *fmask = new KLineEdit( perms_box, "kcfg_FileMask" );
fmask->tqsetAlignment( TQt::AlignRight );
fmask->setAlignment( TQt::AlignRight );

(void) new TQLabel( i18n( "Directory mask:" ), perms_box );
KLineEdit *dmask = new KLineEdit( perms_box, "kcfg_DirectoryMask" );
dmask->tqsetAlignment( TQt::AlignRight );
dmask->setAlignment( TQt::AlignRight );

(void) new TQLabel( i18n( "Write access:" ), perms_box );
KComboBox *read_mode = new KComboBox( perms_box, "kcfg_WriteAccess" );
@@ -1176,7 +1176,7 @@ void Smb4KSambaOptions::slotCustomPortChanged( int port )

if ( view && view->selectedItem() )
{
view->selectedItem()->setText( Port, TQString( "%1" ).tqarg( port ) );
view->selectedItem()->setText( Port, TQString( "%1" ).arg( port ) );

emit customSettingsChanged();
}


+ 2
- 1
smb4k/configdlg/smb4kshareoptions.cpp View File

@@ -40,6 +40,7 @@
// system includes
#include <sys/types.h>
#include <pwd.h>
#include <unistd.h>

// applications specific includes
#include "smb4kshareoptions.h"
@@ -67,7 +68,7 @@ Smb4KShareOptions::Smb4KShareOptions( TQWidget *parent, const char *name ) : TQW
dir_box, "kcfg_ForceLowerCaseSubdirs" );

TQButtonGroup *mount_box = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Mounting and Unmounting" ), this );
(void) new TQCheckBox( i18n( "Unmount all shares of user %1 on exit" ).tqarg( getpwuid( getuid() )->pw_name ),
(void) new TQCheckBox( i18n( "Unmount all shares of user %1 on exit" ).arg( getpwuid( getuid() )->pw_name ),
mount_box, "kcfg_UnmountSharesOnExit" );
(void) new TQCheckBox( i18n( "Remount recently used shares on program start" ),
mount_box, "kcfg_RemountShares" );


+ 3
- 3
smb4k/core/smb4kbookmark.cpp View File

@@ -39,7 +39,7 @@ Smb4KBookmark::Smb4KBookmark( const TQString &host, const TQString &share, const
//FIXME should throw an exception if one of the param is empty

m_ip = ipIsValid( ip ) ? ip : TQString();
m_bookmark = TQString( "//%1/%2" ).tqarg( m_host, m_share );
m_bookmark = TQString( "//%1/%2" ).arg( m_host, m_share );
}


@@ -48,7 +48,7 @@ Smb4KBookmark::Smb4KBookmark( Smb4KShareItem *item, const TQString &ip, const TQ
m_type( item->plainType() ), m_label( label )
{
m_ip = ipIsValid( ip ) ? ip : TQString();
m_bookmark = TQString( "//%1/%2" ).tqarg( m_host, m_share );
m_bookmark = TQString( "//%1/%2" ).arg( m_host, m_share );
}


@@ -61,7 +61,7 @@ void Smb4KBookmark::setShareName( const TQString &name )
{
m_share = name;

m_bookmark = TQString( "//%1/%2" ).tqarg( m_host, m_share );
m_bookmark = TQString( "//%1/%2" ).arg( m_host, m_share );
}




+ 1
- 1
smb4k/core/smb4kbookmarkhandler.cpp View File

@@ -165,7 +165,7 @@ void Smb4KBookmarkHandler::writeBookmarkList( const TQValueList<Smb4KBookmark *>
{
Smb4KError::information( INFO_BOOKMARK_LABEL_IN_USE, (*it)->label(), (*it)->bookmark() );

(*it)->setLabel( TQString( "%1 (%2)" ).tqarg( (*it)->label() ).tqarg( serial_number++ ) );
(*it)->setLabel( TQString( "%1 (%2)" ).arg( (*it)->label() ).arg( serial_number++ ) );
}
}



+ 1
- 1
smb4k/core/smb4kcore.cpp View File

@@ -297,7 +297,7 @@ void Smb4KCore::searchPrograms()
Smb4KSettings::self()->readConfig();

// List of paths that should be searched.
TQStringList path_list = TQStringList::split( ":", TQString( "%1" ).tqarg( getenv( "PATH" ) ), false );
TQStringList path_list = TQStringList::split( ":", TQString( "%1" ).arg( getenv( "PATH" ) ), false );

if ( path_list.find( "/sbin" ) == path_list.end() )
{


+ 30
- 30
smb4k/core/smb4kerror.cpp View File

@@ -89,7 +89,7 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
}
case ERROR_OPENING_WALLET_FAILED:
{
KMessageBox::error( 0, i18n( "The wallet \"%1\" could not be opened. KWallet support will be disabled for this session." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The wallet \"%1\" could not be opened. KWallet support will be disabled for this session." ).arg( text ) );

break;
}
@@ -116,11 +116,11 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The share \"%1\" could not be mounted.\nDetailed information cannot be provided because there was no error message." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The share \"%1\" could not be mounted.\nDetailed information cannot be provided because there was no error message." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The share \"%1\" could not be mounted.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The share \"%1\" could not be mounted.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
@@ -129,18 +129,18 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The share \"%1\" could not be unmounted.\nDetailed information cannot be provided because there was no error message." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The share \"%1\" could not be unmounted.\nDetailed information cannot be provided because there was no error message." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The share \"%1\" could not be unmounted.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The share \"%1\" could not be unmounted.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
}
case ERROR_FILE_NOT_FOUND:
{
KMessageBox::error( 0, i18n( "The file \"%1\" could not be found." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The file \"%1\" could not be found." ).arg( text ) );

break;
}
@@ -148,11 +148,11 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The file \"%1\" could not be read." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The file \"%1\" could not be read." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be read.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be read.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
@@ -172,25 +172,25 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
}
case ERROR_MISSING_PROGRAMS:
{
KMessageBox::error( 0, i18n( "Either your PATH environment variable is not set properly or there are the following programs missing on your system:\n%1\nPlease correct this and restart Smb4K." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "Either your PATH environment variable is not set properly or there are the following programs missing on your system:\n%1\nPlease correct this and restart Smb4K." ).arg( text ) );

break;
}
case ERROR_LOCKED:
{
KMessageBox::error( 0, i18n( "The file \"%1\" is currently being edited by user %2. To avoid any problems, access to this file is denied at the moment. Please try again later." ).tqarg( text.section( ":", 1, 1 ), text.section( ":", 0, 0 ) ) );
KMessageBox::error( 0, i18n( "The file \"%1\" is currently being edited by user %2. To avoid any problems, access to this file is denied at the moment. Please try again later." ).arg( text.section( ":", 1, 1 ), text.section( ":", 0, 0 ) ) );

break;
}
case ERROR_MKDIR_FAILED:
{
KMessageBox::error( 0, i18n( "The directory \"%1\" could not be created." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The directory \"%1\" could not be created." ).arg( text ) );

break;
}
case ERROR_WRITING_FILE:
{
KMessageBox::error( 0, i18n( "The file \"%1\" could not be written." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The file \"%1\" could not be written." ).arg( text ) );

break;
}
@@ -233,7 +233,7 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
}
case ERROR_COMMAND_NOT_FOUND:
{
KMessageBox::error( 0, i18n( "The command \"%1\" could not be found." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The command \"%1\" could not be found." ).arg( text ) );

break;
}
@@ -241,11 +241,11 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The file \"%1\" could not be printed.\nDetailed information cannot be provided because there was no error message." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The file \"%1\" could not be printed.\nDetailed information cannot be provided because there was no error message." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be printed.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be printed.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
@@ -254,11 +254,11 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The temporary directory \"%1\" could not be created.\nDetailed information cannot be provided because there was no error message." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The temporary directory \"%1\" could not be created.\nDetailed information cannot be provided because there was no error message." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The temporary directory \"%1\" could not be created.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The temporary directory \"%1\" could not be created.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
@@ -267,24 +267,24 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The temporary file \"%1\" could not be created.\nDetailed information cannot be provided because there was no error message." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The temporary file \"%1\" could not be created.\nDetailed information cannot be provided because there was no error message." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The temporary file \"%1\" could not be created.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The temporary file \"%1\" could not be created.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
}
case ERROR_DIRECTORY_NOT_FOUND:
{
KMessageBox::error( 0, i18n( "The directory \"%1\" could not be found." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The directory \"%1\" could not be found." ).arg( text ) );

break;
}
case ERROR_FILE_IS_IRREGULAR:
{
KMessageBox::error( 0, i18n( "The file \"%1\" is irregular. That means it is either a symlink, a fifo, or something similar. This could indicate that someone is trying to exploit your system. Please inform your system administrator." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The file \"%1\" is irregular. That means it is either a symlink, a fifo, or something similar. This could indicate that someone is trying to exploit your system. Please inform your system administrator." ).arg( text ) );

break;
}
@@ -305,11 +305,11 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The file \"%1\" could not be opened." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The file \"%1\" could not be opened." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be opened.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be opened.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
@@ -318,18 +318,18 @@ void Smb4KError::error( int code, const TQString &text, const TQString &details
{
if ( details.stripWhiteSpace().isEmpty() )
{
KMessageBox::error( 0, i18n( "The file \"%1\" could not be closed." ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The file \"%1\" could not be closed." ).arg( text ) );
}
else
{
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be closed.\nRead the error message under \"Details\" to find out more." ).tqarg( text ), details );
KMessageBox::detailedError( 0, i18n( "The file \"%1\" could not be closed.\nRead the error message under \"Details\" to find out more." ).arg( text ), details );
}

break;
}
case ERROR_NET_COMMAND:
{
KMessageBox::error( 0, i18n( "The list of arguments for the \"net\" command could not be assembled.\nAt the moment it reads: %1" ).tqarg( text ) );
KMessageBox::error( 0, i18n( "The list of arguments for the \"net\" command could not be assembled.\nAt the moment it reads: %1" ).arg( text ) );

break;
}
@@ -382,19 +382,19 @@ void Smb4KError::information( int code, const TQString &text, const TQString &de
{
case INFO_MIMETYPE_NOT_SUPPORTED:
{
KMessageBox::information( 0, i18n( "The mimetype \"%1\" is not supported. Please convert the file to PostScript or PDF." ).tqarg( text ) );
KMessageBox::information( 0, i18n( "The mimetype \"%1\" is not supported. Please convert the file to PostScript or PDF." ).arg( text ) );

break;
}
case INFO_DISABLE_SUID_FEATURE:
{
KMessageBox::information( 0, i18n( "You previously chose to use \"%1\", but now it is missing on your system. Smb4K will disable this feature." ).tqarg( text ) );
KMessageBox::information( 0, i18n( "You previously chose to use \"%1\", but now it is missing on your system. Smb4K will disable this feature." ).arg( text ) );

break;
}
case INFO_BOOKMARK_LABEL_IN_USE:
{
KMessageBox::information( 0, i18n( "The label \"%1\" is used more than once. It will automatically be renamed for bookmark \"%2\" to avoid confusion." ).tqarg( text, details ) );
KMessageBox::information( 0, i18n( "The label \"%1\" is used more than once. It will automatically be renamed for bookmark \"%2\" to avoid confusion." ).arg( text, details ) );

break;
}
@@ -405,4 +405,4 @@ void Smb4KError::information( int code, const TQString &text, const TQString &de
}
}

// No tqmoc file needs to be included
// No moc file needs to be included

+ 11
- 11
smb4k/core/smb4kfileio.cpp View File

@@ -221,7 +221,7 @@ bool Smb4KFileIO::writeSudoers( Smb4KFileIO::Operation operation )
{
contents.append( "# Entries for Smb4K users." );
contents.append( "# Generated by Smb4K. Please do not modify!" );
contents.append( "User_Alias\tSMB4KUSERS = "+TQString( "%1" ).tqarg( getpwuid( getuid() )->pw_name ) );
contents.append( "User_Alias\tSMB4KUSERS = "+TQString( "%1" ).arg( getpwuid( getuid() )->pw_name ) );
contents.append( "Defaults:SMB4KUSERS\tenv_keep += \"PASSWD USER\"" );
contents.append( "SMB4KUSERS\t"+hostname+" = NOPASSWD: "+Smb4KSettings::smb4k_kill() );
contents.append( "SMB4KUSERS\t"+hostname+" = NOPASSWD: "+Smb4KSettings::smb4k_umount() );
@@ -563,7 +563,7 @@ bool Smb4KFileIO::writeSuperTab( Smb4KFileIO::Operation operation )
{
contents.append( "# Entries for Smb4K users." );
contents.append( "# Generated by Smb4K. Please do not modify!" );
contents.append( ":define Smb4KUsers "+TQString( "%1" ).tqarg( getpwuid( getuid() )->pw_name ) );
contents.append( ":define Smb4KUsers "+TQString( "%1" ).arg( getpwuid( getuid() )->pw_name ) );
#ifndef __FreeBSD__
contents.append( "smb4k_kill\t"+Smb4KSettings::smb4k_kill()+
"\t$(Smb4KUsers)\tuid=root\tgid=root" );
@@ -937,7 +937,7 @@ bool Smb4KFileIO::createLockFile( const TQString &filename )
}
else
{
contents << TQString( "%1:%2" ).tqarg( getpwuid( getuid() )->pw_name ).tqarg( filename );
contents << TQString( "%1:%2" ).arg( getpwuid( getuid() )->pw_name ).arg( filename );
TQCString out = contents.join( "\n" ).local8Bit();

if ( write( file_descriptor, out, out.length() ) == -1 )
@@ -1224,7 +1224,7 @@ void Smb4KFileIO::processSudoers()
{
contents.append( "# Entries for Smb4K users." );
contents.append( "# Generated by Smb4K. Please do not modify!" );
contents.append( "User_Alias\tSMB4KUSERS = "+TQString( "%1" ).tqarg( getpwuid( getuid() )->pw_name ) );
contents.append( "User_Alias\tSMB4KUSERS = "+TQString( "%1" ).arg( getpwuid( getuid() )->pw_name ) );
contents.append( "Defaults:SMB4KUSERS\tenv_keep += \"PASSWD USER\"" );
contents.append( "SMB4KUSERS\t"+hostname+" = NOPASSWD: "+Smb4KSettings::smb4k_kill() );
contents.append( "SMB4KUSERS\t"+hostname+" = NOPASSWD: "+Smb4KSettings::smb4k_umount() );
@@ -1403,10 +1403,10 @@ void Smb4KFileIO::processSudoers()
return;
}

TQString perms = TQString( "%1" ).tqarg( (int)file_stat.st_mode, 0, 8 );
TQString perms = TQString( "%1" ).arg( (int)file_stat.st_mode, 0, 8 );
perms = perms.right( 4 );
TQString owner = TQString( "%1" ).tqarg( (int)file_stat.st_uid );
TQString group = TQString( "%1" ).tqarg( (int)file_stat.st_gid );
TQString owner = TQString( "%1" ).arg( (int)file_stat.st_uid );
TQString group = TQString( "%1" ).arg( (int)file_stat.st_gid );
TQString temp_file_name = TQString( tmp );

// Assemble the command.
@@ -1476,7 +1476,7 @@ void Smb4KFileIO::processSuperTab()
{
contents.append( "# Entries for Smb4K users." );
contents.append( "# Generated by Smb4K. Please do not modify!" );
contents.append( ":define Smb4KUsers "+TQString( "%1" ).tqarg( getpwuid( getuid() )->pw_name ) );
contents.append( ":define Smb4KUsers "+TQString( "%1" ).arg( getpwuid( getuid() )->pw_name ) );
#ifndef __FreeBSD__
contents.append( "smb4k_kill\t"+Smb4KSettings::smb4k_kill()+
"\t$(Smb4KUsers)\tuid=root\tgid=root" );
@@ -1666,10 +1666,10 @@ void Smb4KFileIO::processSuperTab()
return;
}

TQString perms = TQString( "%1" ).tqarg( (int)file_stat.st_mode, 0, 8 );
TQString perms = TQString( "%1" ).arg( (int)file_stat.st_mode, 0, 8 );
perms = perms.right( 4 );
TQString owner = TQString( "%1" ).tqarg( (int)file_stat.st_uid );
TQString group = TQString( "%1" ).tqarg( (int)file_stat.st_gid );
TQString owner = TQString( "%1" ).arg( (int)file_stat.st_uid );
TQString group = TQString( "%1" ).arg( (int)file_stat.st_gid );
TQString temp_file_name = TQString( tmp );

// Assemble the command.


+ 8
- 8
smb4k/core/smb4khomesshareshandler.cpp View File

@@ -77,8 +77,8 @@ const TQString Smb4KHomesSharesHandler::specifyUser( const TQString &host, TQWid

// Set up the ask pass dialog.
TQFrame *frame = m_dlg->plainPage();
TQGridLayout *tqlayout = new TQGridLayout( frame );
tqlayout->setSpacing( 5 );
TQGridLayout *layout = new TQGridLayout( frame );
layout->setSpacing( 5 );

TQLabel *pic = new TQLabel( frame );
pic->setPixmap( DesktopIcon( "personal" ) );
@@ -92,11 +92,11 @@ const TQString Smb4KHomesSharesHandler::specifyUser( const TQString &host, TQWid

TQSpacerItem *spacer1 = new TQSpacerItem( 10, 10, TQSizePolicy::Expanding, TQSizePolicy::Preferred );

tqlayout->addWidget( pic, 0, 0, 0 );
tqlayout->addMultiCellWidget( text, 0, 0, 1, 3, 0 );
tqlayout->addWidget( userLabel, 1, 0, 0 );
tqlayout->addMultiCellWidget( userCombo, 1, 1, 1, 4, 0 );
tqlayout->addItem( spacer1, 0, 2 );
layout->addWidget( pic, 0, 0, 0 );
layout->addMultiCellWidget( text, 0, 0, 1, 3, 0 );
layout->addWidget( userLabel, 1, 0, 0 );
layout->addMultiCellWidget( userCombo, 1, 1, 1, 4, 0 );
layout->addItem( spacer1, 0, 2 );

connect( userCombo, TQT_SIGNAL( textChanged( const TQString &) ),
this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
@@ -117,7 +117,7 @@ const TQString Smb4KHomesSharesHandler::specifyUser( const TQString &host, TQWid

// Do the last things before showing.
userCombo->setFocus();
m_dlg->setFixedSize( m_dlg->tqsizeHint() );
m_dlg->setFixedSize( m_dlg->sizeHint() );

if ( m_dlg->exec() == KDialogBase::Accepted )
{


+ 53
- 53
smb4k/core/smb4kmounter.cpp View File

@@ -115,8 +115,8 @@ Smb4KMounter::~Smb4KMounter()

void Smb4KMounter::init()
{
m_queue.enqueue( new TQString( TQString( "%1:" ).tqarg( Import ) ) );
m_queue.enqueue( new TQString( TQString( "%1:" ).tqarg( Remount ) ) );
m_queue.enqueue( new TQString( TQString( "%1:" ).arg( Import ) ) );
m_queue.enqueue( new TQString( TQString( "%1:" ).arg( Remount ) ) );

startTimer( TIMER_INTERVAL );
}
@@ -160,7 +160,7 @@ void Smb4KMounter::abort()

KProcess proc;
proc.setUseShell( true );
proc << TQString( "%1 smb4k_kill %2" ).tqarg( suid_program ).tqarg( m_proc->pid() );
proc << TQString( "%1 smb4k_kill %2" ).arg( suid_program ).arg( m_proc->pid() );
proc.start( KProcess::DontCare, KProcess::NoCommunication );
}
else
@@ -491,7 +491,7 @@ void Smb4KMounter::mountShare( const TQString &workgroup, const TQString &host,
{
// Before doing anything else let's check that the
// share has not been mounted by the user already:
TQValueList<Smb4KShare> list = findShareByName( TQString( "//%1/%2" ).tqarg( host, share_name ) );
TQValueList<Smb4KShare> list = findShareByName( TQString( "//%1/%2" ).arg( host, share_name ) );

for ( TQValueList<Smb4KShare>::ConstIterator it = list.begin(); it != list.end(); ++it )
{
@@ -503,9 +503,9 @@ void Smb4KMounter::mountShare( const TQString &workgroup, const TQString &host,
}
}

m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).tqarg( Mount )
.tqarg( workgroup, host )
.tqarg( ip, share_name ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).arg( Mount )
.arg( workgroup, host )
.arg( ip, share_name ) ) );
}
}

@@ -604,7 +604,7 @@ void Smb4KMounter::mount( const TQString &workgroup, const TQString &host, const
#ifndef __FreeBSD__

// Let's see if the options handler knows the share:
Smb4KSambaOptionsInfo *info = optionsHandler()->findItem( TQString( "//%1/%2" ).tqarg( m_priv->host(), m_priv->share() ), true );
Smb4KSambaOptionsInfo *info = optionsHandler()->findItem( TQString( "//%1/%2" ).arg( m_priv->host(), m_priv->share() ), true );

// Determine the file system we have to use:
int filesystem;
@@ -626,28 +626,28 @@ void Smb4KMounter::mount( const TQString &workgroup, const TQString &host, const
case Smb4KSettings::EnumFilesystem::CIFS:
{
command.append( Smb4KSettings::alwaysUseSuperUser() ? // FIXME: Check if suid program is installed
TQString( "%1 smb4k_mount -s -t cifs " ).tqarg( suid_program ) :
TQString( "%1 smb4k_mount -s -t cifs " ).arg( suid_program ) :
"smb4k_mount -n -t cifs " );

command.append( "-o " );

command.append( optionsHandler()->mountOptions( TQString( "//%1/%2" ).tqarg( m_priv->host(), m_priv->share() ) ) );
command.append( optionsHandler()->mountOptions( TQString( "//%1/%2" ).arg( m_priv->host(), m_priv->share() ) ) );

command.append( !m_priv->workgroup().stripWhiteSpace().isEmpty() ?
TQString( "domain='%1'," ).tqarg( m_priv->workgroup() ) :
TQString( "domain='%1'," ).arg( m_priv->workgroup() ) :
"" );

command.append( !m_priv->ip().stripWhiteSpace().isEmpty() ?
TQString( "ip=%1," ).tqarg( m_priv->ip() ) :
TQString( "ip=%1," ).arg( m_priv->ip() ) :
"" );

command.append( !authInfo.user().isEmpty() ?
TQString( "user=%1" ).tqarg( authInfo.user().data() ) :
TQString( "user=%1" ).arg( authInfo.user().data() ) :
"guest" );

command.append( " -- " );

command.append( TQString( "//'%1'/'%2' '%3'" ).tqarg( m_priv->host(), m_priv->share(), m_priv->path() ) );
command.append( TQString( "//'%1'/'%2' '%3'" ).arg( m_priv->host(), m_priv->share(), m_priv->path() ) );

m_priv->setCIFSLogin( !authInfo.user().isEmpty() ?
authInfo.user() :
@@ -660,28 +660,28 @@ void Smb4KMounter::mount( const TQString &workgroup, const TQString &host, const
case Smb4KSettings::EnumFilesystem::SMBFS:
{
command.append( Smb4KSettings::alwaysUseSuperUser() ? // FIXME: Check if suid program is installed
TQString( "%1 smb4k_mount -s -t smbfs " ).tqarg( suid_program ) :
TQString( "%1 smb4k_mount -s -t smbfs " ).arg( suid_program ) :
"smb4k_mount -n -t smbfs " );

command.append( "-o " );

command.append( optionsHandler()->mountOptions( TQString( "//%1/%2" ).tqarg( m_priv->host(), m_priv->share() ) ) );
command.append( optionsHandler()->mountOptions( TQString( "//%1/%2" ).arg( m_priv->host(), m_priv->share() ) ) );

command.append( !m_priv->workgroup().stripWhiteSpace().isEmpty() ?
TQString( "workgroup='%1'," ).tqarg( m_priv->workgroup() ) :
TQString( "workgroup='%1'," ).arg( m_priv->workgroup() ) :
"" );

command.append( !m_priv->ip().stripWhiteSpace().isEmpty() ?
TQString( "ip=%1," ).tqarg( m_priv->ip() ) :
TQString( "ip=%1," ).arg( m_priv->ip() ) :
"" );

command.append( !authInfo.user().isEmpty() ?
TQString( "username=%1" ).tqarg( authInfo.user().data() ) :
TQString( "username=%1" ).arg( authInfo.user().data() ) :
"guest" );

command.append( " -- " );

command.append( TQString( "//'%1'/'%2' '%3'" ).tqarg( m_priv->host(), m_priv->share(), m_priv->path() ) );
command.append( TQString( "//'%1'/'%2' '%3'" ).arg( m_priv->host(), m_priv->share(), m_priv->path() ) );

m_priv->setFileSystem( "smbfs" );

@@ -704,27 +704,27 @@ void Smb4KMounter::mount( const TQString &workgroup, const TQString &host, const
Smb4KSettings::remotePort();

command.append( Smb4KSettings::alwaysUseSuperUser() ? // FIXME: Check if suid program is installed
TQString( "%1 smb4k_mount " ).tqarg( suid_program ) :
TQString( "%1 smb4k_mount " ).arg( suid_program ) :
"smb4k_mount " );

command.append( optionsHandler()->mountOptions( TQString( "//%1/%2" ).tqarg( m_priv->host(), m_priv->share() ) ) );
command.append( optionsHandler()->mountOptions( TQString( "//%1/%2" ).arg( m_priv->host(), m_priv->share() ) ) );

command.append( !m_priv->workgroup().stripWhiteSpace().isEmpty() ?
TQString( " -W '%1'" ).tqarg( m_priv->workgroup() ) :
TQString( " -W '%1'" ).arg( m_priv->workgroup() ) :
"" );

command.append( !m_priv->ip().stripWhiteSpace().isEmpty() ?
TQString( " -I %1" ).tqarg( m_priv->ip() ) :
TQString( " -I %1" ).arg( m_priv->ip() ) :
"" );

command.append( " -N" );

command.append( " -- " );

command.append( TQString( "//%1@'%2':%3/'%4' '%5'" ).tqarg( !authInfo.user().isEmpty() ? authInfo.user() : "guest" )
.tqarg( m_priv->host() )
.tqarg( port )
.tqarg( m_priv->share(), m_priv->path() ) );
command.append( TQString( "//%1@'%2':%3/'%4' '%5'" ).arg( !authInfo.user().isEmpty() ? authInfo.user() : "guest" )
.arg( m_priv->host() )
.arg( port )
.arg( m_priv->share(), m_priv->path() ) );

#endif

@@ -743,9 +743,9 @@ void Smb4KMounter::unmountShare( Smb4KShare *share, bool force, bool noMessage )
{
// Do *not* change share->canonicalPath(). It is necessary for the
// checks below to work.
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Unmount )
.tqarg( share->canonicalPath().data() )
.tqarg( force, noMessage ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).arg( Unmount )
.arg( share->canonicalPath().data() )
.arg( force, noMessage ) ) );
}


@@ -815,12 +815,12 @@ void Smb4KMounter::unmount( const TQString &mountpoint, bool force, bool noMessa
if ( KMessageBox::questionYesNo( 0, i18n( "Do you really want to force the unmounting of this share?" ), TQString(), KStdGuiItem::yes(), KStdGuiItem::no(), "Dont Ask Forced", KMessageBox::Notify ) == KMessageBox::Yes )
{
#ifdef __linux__
command.append( TQString( "%1 smb4k_umount -s -l " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount -s -l " ).arg( suid_program ) );
#else
#ifdef __FreeBSD__
command.append( TQString( "%1 smb4k_umount " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount " ).arg( suid_program ) );
#else
command.append( TQString( "%1 smb4k_umount -s " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount -s " ).arg( suid_program ) );
#endif
#endif
execute = true;
@@ -846,9 +846,9 @@ void Smb4KMounter::unmount( const TQString &mountpoint, bool force, bool noMessa
else
{
#ifndef __FreeBSD__
command.append( TQString( "%1 smb4k_umount -s " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount -s " ).arg( suid_program ) );
#else
command.append( TQString( "%1 smb4k_umount " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount " ).arg( suid_program ) );
#endif
}
}
@@ -862,12 +862,12 @@ void Smb4KMounter::unmount( const TQString &mountpoint, bool force, bool noMessa
if ( KMessageBox::questionYesNo( 0, i18n( "Do you really want to force the unmounting of this share?" ), TQString(), KStdGuiItem::yes(), KStdGuiItem::no(), "Dont Ask Forced", KMessageBox::Notify ) == KMessageBox::Yes )
{
#ifdef __linux__
command.append( TQString( "%1 smb4k_umount -s -l " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount -s -l " ).arg( suid_program ) );
#else
#ifdef __FreeBSD__
command.append( TQString( "%1 smb4k_umount " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount " ).arg( suid_program ) );
#else
command.append( TQString( "%1 smb4k_umount -s " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount -s " ).arg( suid_program ) );
#endif
#endif
execute = true;
@@ -893,9 +893,9 @@ void Smb4KMounter::unmount( const TQString &mountpoint, bool force, bool noMessa
else
{
#ifndef __FreeBSD__
command.append( TQString( "%1 smb4k_umount -s " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount -s " ).arg( suid_program ) );
#else
command.append( TQString( "%1 smb4k_umount " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount " ).arg( suid_program ) );
#endif
}
}
@@ -915,9 +915,9 @@ void Smb4KMounter::unmount( const TQString &mountpoint, bool force, bool noMessa
}

#ifndef __FreeBSD__
command.append( TQString( "-t %1 " ).tqarg( share->filesystem() ) );
command.append( TQString( "-t %1 " ).arg( share->filesystem() ) );
#endif
command.append( TQString( "'%1'" ).tqarg( m_priv->path() ) );
command.append( TQString( "'%1'" ).arg( m_priv->path() ) );

if ( force && !execute )
{
@@ -952,7 +952,7 @@ void Smb4KMounter::unmount( const TQString &mountpoint, bool force, bool noMessa

void Smb4KMounter::unmountAllShares()
{
m_queue.enqueue( new TQString( TQString( "%1" ).tqarg( UnmountAll ) ) );
m_queue.enqueue( new TQString( TQString( "%1" ).arg( UnmountAll ) ) );
}


@@ -1043,7 +1043,7 @@ void Smb4KMounter::processMount()
m_buffer.contains( "bad user name" ) == 0 &&
m_buffer.contains( "bad group name" ) == 0 )
{
TQString name = TQString( "//%1/%2" ).tqarg( m_priv->host() ).tqarg( m_priv->share() );
TQString name = TQString( "//%1/%2" ).arg( m_priv->host() ).arg( m_priv->share() );

// Check file system
#if !defined(__solaris__)
@@ -1176,7 +1176,7 @@ void Smb4KMounter::processMount()
}
else
{
TQString name = TQString( "//%1/%2" ).tqarg( m_priv->host() ).tqarg( m_priv->share() );
TQString name = TQString( "//%1/%2" ).arg( m_priv->host() ).arg( m_priv->share() );

Smb4KError::error( ERROR_MOUNTING_SHARE, name, m_buffer );
}
@@ -1200,7 +1200,7 @@ void Smb4KMounter::processMount()
Smb4KAuthInfo authInfo( m_priv->workgroup(), m_priv->host(), m_priv->share() );
(void) passwordHandler()->readAuth( &authInfo );

TQString name = TQString( "//%1@%2/%3" ).tqarg( authInfo.user().upper(), m_priv->host().upper(), m_priv->share().upper() );
TQString name = TQString( "//%1@%2/%3" ).arg( authInfo.user().upper(), m_priv->host().upper(), m_priv->share().upper() );

share = new Smb4KShare( name, m_priv->path(), m_priv->filesystem(), (int)getuid(), (int)getgid() );
m_mounted_shares.append( share );
@@ -1225,7 +1225,7 @@ void Smb4KMounter::processMount()
Smb4KAuthInfo authInfo( m_priv->workgroup(), m_priv->host(), m_priv->share() );
(void) passwordHandler()->readAuth( &authInfo );

TQString name = TQString( "//%1@%2/%3" ).tqarg( authInfo.user().upper(), m_priv->host().upper(), m_priv->share().upper() );
TQString name = TQString( "//%1@%2/%3" ).arg( authInfo.user().upper(), m_priv->host().upper(), m_priv->share().upper() );

Smb4KError::error( ERROR_MOUNTING_SHARE, name, m_buffer );
}
@@ -1284,7 +1284,7 @@ void Smb4KMounter::processUnmount()
}
else
{
TQString str = TQString( "sudo: unable to resolve host %1\n" ).tqarg( hostname );
TQString str = TQString( "sudo: unable to resolve host %1\n" ).arg( hostname );

m_buffer.remove( str, false /* case insensitive */ );

@@ -1527,7 +1527,7 @@ void Smb4KMounter::timerEvent( TQTimerEvent * )
if ( m_priv->timerTicks * timerInterval() >= Smb4KSettings::checkInterval() /* msec */ &&
(!m_working || m_queue.isEmpty()) )
{
m_queue.enqueue( new TQString( TQString( "%1:" ).tqarg( Import ) ) );
m_queue.enqueue( new TQString( TQString( "%1:" ).arg( Import ) ) );
m_priv->timerTicks = 0;
}
}
@@ -1663,9 +1663,9 @@ void Smb4KMounter::slotShutdown()
if ( Smb4KSettings::alwaysUseSuperUser() )
{
#ifndef __FreeBSD__
command.append( TQString( "%1 smb4k_umount -s -t %2 " ).tqarg( suid_program ).tqarg( (*it)->filesystem() ) );
command.append( TQString( "%1 smb4k_umount -s -t %2 " ).arg( suid_program ).arg( (*it)->filesystem() ) );
#else
command.append( TQString( "%1 smb4k_umount " ).tqarg( suid_program ) );
command.append( TQString( "%1 smb4k_umount " ).arg( suid_program ) );
#endif
command.append( KProcess::quote( (*it)->path() ) );
command.append( " ; " );
@@ -1673,7 +1673,7 @@ void Smb4KMounter::slotShutdown()
else
{
#ifndef __FreeBSD__
command.append( TQString( "smb4k_umount -n -t %1 " ).tqarg( (*it)->filesystem() ) );
command.append( TQString( "smb4k_umount -n -t %1 " ).arg( (*it)->filesystem() ) );
#else
command.append( "smb4k_umount " );
#endif


+ 16
- 16
smb4k/core/smb4kpasswordhandler.cpp View File

@@ -238,15 +238,15 @@ bool Smb4KPasswordHandler::askpass( const TQString &workgroup, const TQString &h
KDialogBase::Ok, parent, name, true, true );

TQFrame *frame = m_dlg->plainPage();
TQGridLayout *tqlayout = new TQGridLayout( frame );
tqlayout->setSpacing( 5 );
tqlayout->setMargin( 0 );
TQGridLayout *layout = new TQGridLayout( frame );
layout->setSpacing( 5 );
layout->setMargin( 0 );

TQLabel *pixmap_label = new TQLabel( frame );
pixmap_label->setPixmap( DesktopIcon( "identity" ) );
pixmap_label->adjustSize();

tqlayout->addWidget( pixmap_label, 0, 0, TQt::AlignCenter );
layout->addWidget( pixmap_label, 0, 0, TQt::AlignCenter );

TQString message;

@@ -275,21 +275,21 @@ bool Smb4KPasswordHandler::askpass( const TQString &workgroup, const TQString &h

if ( m_auth->share().stripWhiteSpace().isEmpty() )
{
message.append( i18n( "Please enter authentication data for server %1." ).tqarg( m_auth->host() ) );
message.append( i18n( "Please enter authentication data for server %1." ).arg( m_auth->host() ) );
}
else
{
message.append( i18n( "Please enter authentication data for share %1." ).tqarg( "//"+m_auth->host()+"/"+m_auth->share() ) );
message.append( i18n( "Please enter authentication data for share %1." ).arg( "//"+m_auth->host()+"/"+m_auth->share() ) );
}

TQLabel *message_label = new TQLabel( frame );
message_label->setText( message.stripWhiteSpace() );
message_label->setTextFormat( TQt::RichText );

tqlayout->addWidget( message_label, 0, 1, 0 );
layout->addWidget( message_label, 0, 1, 0 );

TQLabel *user_label = new TQLabel( i18n( "User:" ), frame );
tqlayout->addWidget( user_label, 1, 0, 0 );
layout->addWidget( user_label, 1, 0, 0 );

KLineEdit *user_edit = NULL;
KComboBox *user_combo = NULL;
@@ -298,25 +298,25 @@ bool Smb4KPasswordHandler::askpass( const TQString &workgroup, const TQString &h
{
user_edit = new KLineEdit( frame, "AskPassUserEdit" );
user_edit->setMinimumWidth( 200 );
tqlayout->addWidget( user_edit, 1, 1, 0 );
layout->addWidget( user_edit, 1, 1, 0 );
}
else
{
user_combo = new KComboBox( frame, "AskPassUserCombo" );
user_combo->setEditable( true );
user_combo->setMinimumWidth( 200 );
tqlayout->addWidget( user_combo, 1, 1, 0 );
layout->addWidget( user_combo, 1, 1, 0 );
}

TQLabel *password_label = new TQLabel( i18n( "Password:" ), frame );
tqlayout->addWidget( password_label, 2, 0, 0 );
layout->addWidget( password_label, 2, 0, 0 );

KLineEdit *pass_edit = new KLineEdit( frame, "AskPassPasswordEdit" );
pass_edit->setEchoMode( KLineEdit::Password );
tqlayout->addWidget( pass_edit, 2, 1, 0 );
layout->addWidget( pass_edit, 2, 1, 0 );

m_dlg->setMainWidget( frame );
m_dlg->setFixedSize( 350, m_dlg->tqsizeHint().height() );
m_dlg->setFixedSize( 350, m_dlg->sizeHint().height() );
m_dlg->enableButtonOK( false );

// Since we have to allow empty passwords, we will only connect
@@ -791,7 +791,7 @@ void Smb4KPasswordHandler::writeToSMBConfFile( Smb4KAuthInfo *authInfo )
connect( p, TQT_SIGNAL( processExited( KProcess * ) ),
this, TQT_SLOT( slotWritePassword( KProcess * ) ) );

*p << TQString( "smbutil crypt %1" ).tqarg( m_nsmbrc_auth.password() );
*p << TQString( "smbutil crypt %1" ).arg( m_nsmbrc_auth.password() );

p->start( KProcess::NotifyOnExit, KProcess::AllOutput );
}
@@ -901,11 +901,11 @@ void Smb4KPasswordHandler::slotWritePassword( KProcess *proc )

if ( m_nsmbrc_auth.share().isEmpty() )
{
section.append( TQString( "[%1:%2]" ).tqarg( m_nsmbrc_auth.host().upper(), m_nsmbrc_auth.user().isEmpty() ? "GUEST" : m_nsmbrc_auth.user().upper() ) );
section.append( TQString( "[%1:%2]" ).arg( m_nsmbrc_auth.host().upper(), m_nsmbrc_auth.user().isEmpty() ? "GUEST" : m_nsmbrc_auth.user().upper() ) );
}
else
{
section.append( TQString( "[%1:%2:%3]" ).tqarg( m_nsmbrc_auth.host().upper(), m_nsmbrc_auth.user().isEmpty() ? "GUEST" : m_nsmbrc_auth.user().upper(), m_nsmbrc_auth.share().upper() ) );
section.append( TQString( "[%1:%2:%3]" ).arg( m_nsmbrc_auth.host().upper(), m_nsmbrc_auth.user().isEmpty() ? "GUEST" : m_nsmbrc_auth.user().upper(), m_nsmbrc_auth.share().upper() ) );
}

TQStringList::Iterator it = contents.find( section );


+ 4
- 4
smb4k/core/smb4kpreviewer.cpp View File

@@ -139,13 +139,13 @@ void Smb4KPreviewer::timerEvent( TQTimerEvent * )
// (b) Do not pass the path unquoted, or you'll get a NT_STATUS_OBJECT_NAME_NOT_FOUND
// error message in the case the path is empty.
TQString command;
command.append( TQString( "smbclient //%1/%2 " ).tqarg( KProcess::quote( m_item->host() ), KProcess::quote( m_item->share() ) ) );
command.append( TQString( " -d1 -W %1 -D %2 " ).tqarg( KProcess::quote( m_item->workgroup() ), KProcess::quote( m_item->path() ) ) );
command.append( TQString( "smbclient //%1/%2 " ).arg( KProcess::quote( m_item->host() ), KProcess::quote( m_item->share() ) ) );
command.append( TQString( " -d1 -W %1 -D %2 " ).arg( KProcess::quote( m_item->workgroup() ), KProcess::quote( m_item->path() ) ) );
command.append( " -c \"ls\" " );

if ( !m_item->ip().isEmpty() )
{
command.append( TQString( " -I %1 " ).tqarg( m_item->ip() ) );
command.append( TQString( " -I %1 " ).arg( m_item->ip() ) );
}

command.append( optionsHandler()->smbclientOptions( "//"+m_item->host()+"/"+m_item->share() ) );
@@ -154,7 +154,7 @@ void Smb4KPreviewer::timerEvent( TQTimerEvent * )

if ( !auth->user().isEmpty() )
{
command.append( TQString( " -U %1" ).tqarg( KProcess::quote( auth->user() ) ) );
command.append( TQString( " -U %1" ).arg( KProcess::quote( auth->user() ) ) );

if ( !auth->password().isEmpty() )
{


+ 9
- 9
smb4k/core/smb4kprint.cpp View File

@@ -180,22 +180,22 @@ void Smb4KPrint::setDeviceURI()
{
if ( !auth->user().isEmpty() )
{
uri = TQString( "smb://%1:%2@%3/%4/%5" ).tqarg( auth->user().data(), auth->password().data() ).tqarg( m_info->workgroup(), m_info->host(), m_info->printer() );
uri = TQString( "smb://%1:%2@%3/%4/%5" ).arg( auth->user().data(), auth->password().data() ).arg( m_info->workgroup(), m_info->host(), m_info->printer() );
}
else
{
uri = TQString( "smb://%1/%2/%3" ).tqarg( m_info->workgroup(), m_info->host(), m_info->printer() );
uri = TQString( "smb://%1/%2/%3" ).arg( m_info->workgroup(), m_info->host(), m_info->printer() );
}
}
else
{
if ( !auth->user().isEmpty() )
{
uri = TQString( "smb://%1:%2@%3/%4" ).tqarg( auth->user().data(), auth->password().data() ).tqarg( m_info->host(), m_info->printer() );
uri = TQString( "smb://%1:%2@%3/%4" ).arg( auth->user().data(), auth->password().data() ).arg( m_info->host(), m_info->printer() );
}
else
{
uri = TQString( "smb://%1/%2" ).tqarg( m_info->host(), m_info->printer() );
uri = TQString( "smb://%1/%2" ).arg( m_info->host(), m_info->printer() );
}
}

@@ -214,7 +214,7 @@ void Smb4KPrint::printNormal()
TQString command;

command.append( "smbspool 111 "+TQString( getpwuid( getuid() )->pw_name ) );
command.append( " \"Smb4K print job\" "+TQString( "%1" ).tqarg( m_info->copies() ) );
command.append( " \"Smb4K print job\" "+TQString( "%1" ).arg( m_info->copies() ) );
command.append( " \"\" "+KProcess::quote( m_info->path() ) );

*m_proc << command;
@@ -242,7 +242,7 @@ void Smb4KPrint::printDVI()

// The actual print command:
command.append( "smbspool 111 "+TQString( getpwuid( getuid() )->pw_name ) );
command.append( " \"Smb4K print job\" "+TQString( "%1" ).tqarg( m_info->copies() ) );
command.append( " \"Smb4K print job\" "+TQString( "%1" ).arg( m_info->copies() ) );
command.append( " \"\" "+KProcess::quote( temp_file )+" && " );

// Clean up:
@@ -274,7 +274,7 @@ void Smb4KPrint::printText()

// The actual print command:
command.append( "smbspool 111 "+TQString( getpwuid( getuid() )->pw_name ) );
command.append( " \"Smb4K print job\" "+TQString( "%1" ).tqarg( m_info->copies() ) );
command.append( " \"Smb4K print job\" "+TQString( "%1" ).arg( m_info->copies() ) );
command.append( " \"\" "+KProcess::quote( temp_file )+" && " );

// Clean up:
@@ -341,13 +341,13 @@ void Smb4KPrint::slotProcessExited( KProcess * )
Smb4KError::error( ERROR_PRINTING, m_info->path(), m_buffer );

// Clean up:
TQFile::remove( TQString( "%1/smb4k_print.ps" ).tqarg( tempDir() ) );
TQFile::remove( TQString( "%1/smb4k_print.ps" ).arg( tempDir() ) );
}
}
else
{
// Clean up:
TQFile::remove( TQString( "%1/smb4k_print.ps" ).tqarg( tempDir() ) );
TQFile::remove( TQString( "%1/smb4k_print.ps" ).arg( tempDir() ) );
}

m_proc->clearArguments();


+ 39
- 39
smb4k/core/smb4ksambaoptionshandler.cpp View File

@@ -522,23 +522,23 @@ const TQString Smb4KSambaOptionsHandler::smbclientOptions( const TQString &share

// Options that are not customizable:
args.append( !resolve_order.isEmpty() ?
TQString( " -R '%1'" ).tqarg( resolve_order ) :
TQString( " -R '%1'" ).arg( resolve_order ) :
TQString() );

args.append( !netbios_name.isEmpty() ?
TQString( " -n '%1'" ).tqarg( netbios_name ) :
TQString( " -n '%1'" ).arg( netbios_name ) :
TQString() );

args.append( !netbios_scope.isEmpty() ?
TQString( " -i '%1'" ).tqarg( netbios_scope ) :
TQString( " -i '%1'" ).arg( netbios_scope ) :
TQString() );

args.append( !socket_options.isEmpty() ?
TQString( " -O '%1'" ).tqarg( socket_options ) :
TQString( " -O '%1'" ).arg( socket_options ) :
TQString() );

args.append( Smb4KSettings::bufferSize() != 65520 ?
TQString( " -b %1" ).tqarg( Smb4KSettings::bufferSize() ) :
TQString( " -b %1" ).arg( Smb4KSettings::bufferSize() ) :
TQString() );

args.append( Smb4KSettings::machineAccount() ? " -P" : TQString() );
@@ -577,7 +577,7 @@ const TQString Smb4KSambaOptionsHandler::smbclientOptions( const TQString &share

args.append( kerberos ? " -k" : TQString() );

args.append( TQString( " -p %1" ).tqarg( port ) );
args.append( TQString( " -p %1" ).arg( port ) );

return args;
}
@@ -615,24 +615,24 @@ const TQString Smb4KSambaOptionsHandler::nmblookupOptions( bool with_broadcast )
TQString();

args.append( !netbios_name.isEmpty() ?
TQString( " -n '%1'" ).tqarg( netbios_name ) :
TQString( " -n '%1'" ).arg( netbios_name ) :
TQString() );

args.append( !netbios_scope.isEmpty() ?
TQString( " -i '%1'" ).tqarg( netbios_scope ) :
TQString( " -i '%1'" ).arg( netbios_scope ) :
TQString() );

args.append( !socket_options.isEmpty() ?
TQString( " -O '%1'" ).tqarg( socket_options ) :
TQString( " -O '%1'" ).arg( socket_options ) :
TQString() );

args.append( !domain.isEmpty() ?
TQString( " -W '%1'" ).tqarg( domain ) :
TQString( " -W '%1'" ).arg( domain ) :
TQString() );

args.append( (!Smb4KSettings::broadcastAddress().isEmpty() &&
with_broadcast) ?
TQString( " -B %1" ).tqarg( Smb4KSettings::broadcastAddress() ) :
TQString( " -B %1" ).arg( Smb4KSettings::broadcastAddress() ) :
TQString() );

args.append( Smb4KSettings::usePort137() ?
@@ -719,11 +719,11 @@ const TQString Smb4KSambaOptionsHandler::netOptions( int command, const TQString
// Protocol can only be defined by us developers,
// and we should know what we are doing. So, no
// checks for the right protocol here:
args.append( TQString( " %1" ).tqarg( protocol ) );
args.append( TQString( " %1" ).arg( protocol ) );
}
else
{
args.append( TQString( " %1" ).tqarg( TQString::compare( default_protocol, "ads" ) != 0 ?
args.append( TQString( " %1" ).arg( TQString::compare( default_protocol, "ads" ) != 0 ?
default_protocol :
TQString() /* FIXME: Is that the best way how to do it? */) );
}
@@ -754,7 +754,7 @@ const TQString Smb4KSambaOptionsHandler::netOptions( int command, const TQString
}

// This lookup command takes no protocol:
args.append( TQString( " lookup host %1" ).tqarg( networkItem ) );
args.append( TQString( " lookup host %1" ).arg( networkItem ) );

break;
}
@@ -769,7 +769,7 @@ const TQString Smb4KSambaOptionsHandler::netOptions( int command, const TQString
}

// This lookup command takes no protocol:
args.append( TQString( " lookup master '%1'" ).tqarg( networkItem ) );
args.append( TQString( " lookup master '%1'" ).arg( networkItem ) );

break;
}
@@ -789,18 +789,18 @@ const TQString Smb4KSambaOptionsHandler::netOptions( int command, const TQString
}

args.append( !domain.isEmpty() ?
TQString( " -W '%1'" ).tqarg( domain ) :
TQString( " -W '%1'" ).arg( domain ) :
TQString() );

args.append( !netbios_name.isEmpty() ?
TQString( " -n '%1'" ).tqarg( netbios_name ) :
TQString( " -n '%1'" ).arg( netbios_name ) :
TQString() );

args.append( Smb4KSettings::machineAccount() ?
" -P" :
TQString() );

args.append( TQString( " -p %1" ).tqarg( port ) );
args.append( TQString( " -p %1" ).arg( port ) );

return args;
}
@@ -1167,7 +1167,7 @@ const TQString Smb4KSambaOptionsHandler::mountOptions( const TQString &share )
}
case Smb4KSettings::EnumServerCodepage::unicode:
{
codepage = "tqunicode";
codepage = "unicode";

break;
}
@@ -1209,21 +1209,21 @@ const TQString Smb4KSambaOptionsHandler::mountOptions( const TQString &share )

// Compile the arguments list:
args.append( !netbios_name.isEmpty() ?
TQString( "netbiosname='%1'," ).tqarg( netbios_name ) :
TQString( "netbiosname='%1'," ).arg( netbios_name ) :
TQString() );

args.append( !uid.isEmpty() ?
TQString( "uid=%1," ).tqarg( uid ) :
TQString( "uid=%1," ).arg( uid ) :
TQString() );

args.append( !gid.isEmpty() ?
TQString( "gid=%1," ).tqarg( gid ) :
TQString( "gid=%1," ).arg( gid ) :
TQString() );

args.append( TQString( "port=%1," ).tqarg( port ) );
args.append( TQString( "port=%1," ).arg( port ) );

args.append( !charset.isEmpty() ?
TQString( "iocharset=%1," ).tqarg( charset ) :
TQString( "iocharset=%1," ).arg( charset ) :
TQString() );

args.append( read_write ? "rw," : "ro," );
@@ -1233,11 +1233,11 @@ const TQString Smb4KSambaOptionsHandler::mountOptions( const TQString &share )
case Smb4KSettings::EnumFilesystem::CIFS:
{
args.append( !Smb4KSettings::fileMask().isEmpty() ?
TQString( "file_mode=%1," ).tqarg( Smb4KSettings::fileMask() ) :
TQString( "file_mode=%1," ).arg( Smb4KSettings::fileMask() ) :
TQString() );

args.append( !Smb4KSettings::directoryMask().isEmpty() ?
TQString( "dir_mode=%1," ).tqarg( Smb4KSettings::directoryMask() ) :
TQString( "dir_mode=%1," ).arg( Smb4KSettings::directoryMask() ) :
TQString() );

args.append( Smb4KSettings::permissionChecks() ?
@@ -1273,33 +1273,33 @@ const TQString Smb4KSambaOptionsHandler::mountOptions( const TQString &share )
case Smb4KSettings::EnumFilesystem::SMBFS:
{
args.append( !socket_options.isEmpty() ?
TQString( "sockopt='%1'," ).tqarg( socket_options ) :
TQString( "sockopt='%1'," ).arg( socket_options ) :
TQString() );

args.append( !netbios_scope.isEmpty() ?
TQString( "scope=%1," ).tqarg( netbios_scope ) :
TQString( "scope=%1," ).arg( netbios_scope ) :
TQString() );

args.append( !codepage.isEmpty() ?
TQString( "codepage=%1," ).tqarg( codepage ) :
TQString( "codepage=%1," ).arg( codepage ) :
TQString() );

args.append( !Smb4KSettings::fileMask().isEmpty() ?
TQString( "fmask=%1," ).tqarg( Smb4KSettings::fileMask() ) :
TQString( "fmask=%1," ).arg( Smb4KSettings::fileMask() ) :
TQString() );

args.append( !Smb4KSettings::directoryMask().isEmpty() ?
TQString( "dmask=%1," ).tqarg( Smb4KSettings::directoryMask() ) :
TQString( "dmask=%1," ).arg( Smb4KSettings::directoryMask() ) :
TQString() );

args.append( kerberos ? "krb," : TQString() );

args.append( Smb4KSettings::cachingTime() != 1000 ?
TQString( "ttl=%1," ).tqarg( Smb4KSettings::cachingTime() ) :
TQString( "ttl=%1," ).arg( Smb4KSettings::cachingTime() ) :
TQString() );

args.append( Smb4KSettings::unicodeSupport() ?
"tqunicode," :
"unicode," :
TQString() );

args.append( Smb4KSettings::largeFileSystemSupport() ?
@@ -1318,23 +1318,23 @@ const TQString Smb4KSambaOptionsHandler::mountOptions( const TQString &share )

// Compile the arguments list:
args.append( !uid.isEmpty() ?
TQString( " -u %1" ).tqarg( uid ) :
TQString( " -u %1" ).arg( uid ) :
TQString() );

args.append( !gid.isEmpty() ?
TQString( " -g %1" ).tqarg( gid ) :
TQString( " -g %1" ).arg( gid ) :
TQString() );

args.append( !charset.isEmpty() && !codepage.isEmpty() ?
TQString( " -E %1:%2" ).tqarg( charset, codepage ) :
TQString( " -E %1:%2" ).arg( charset, codepage ) :
TQString() );

args.append( !Smb4KSettings::fileMask().isEmpty() ?
TQString( " -f %1" ).tqarg( Smb4KSettings::fileMask() ) :
TQString( " -f %1" ).arg( Smb4KSettings::fileMask() ) :
TQString() );

args.append( !Smb4KSettings::directoryMask().isEmpty() ?
TQString( " -d %1" ).tqarg( Smb4KSettings::directoryMask() ) :
TQString( " -d %1" ).arg( Smb4KSettings::directoryMask() ) :
TQString() );

// NOTE: Under FreeBSD the port must be managed by the mounter.
@@ -1468,7 +1468,7 @@ void Smb4KSambaOptionsHandler::read_smb_conf()
}
else
{
m_samba_options["netbios name"] = ( TQString( "%1" ).tqarg( hostname ) ).upper();
m_samba_options["netbios name"] = ( TQString( "%1" ).arg( hostname ) ).upper();
}

delete [] hostname;


+ 1
- 1
smb4k/core/smb4ksambaoptionsinfo.cpp View File

@@ -47,7 +47,7 @@ Smb4KSambaOptionsInfo::Smb4KSambaOptionsInfo( Smb4KShare *share )
m_filesystem( share->filesystem() ), m_write_access( true ),
#endif
m_protocol( TQString() ), m_kerberos( false ),
m_uid( TQString( "%1" ).tqarg( share->uid() ) ), m_gid( TQString( "%1" ).tqarg( share->gid() ) )
m_uid( TQString( "%1" ).arg( share->uid() ) ), m_gid( TQString( "%1" ).arg( share->gid() ) )
{
}



+ 23
- 23
smb4k/core/smb4kscanner.cpp View File

@@ -150,7 +150,7 @@ void Smb4KScanner::init()

void Smb4KScanner::rescan()
{
m_queue.enqueue( new TQString( TQString( "%1:" ).tqarg( Init ) ) );
m_queue.enqueue( new TQString( TQString( "%1:" ).arg( Init ) ) );
}


@@ -160,7 +160,7 @@ void Smb4KScanner::rescan()

void Smb4KScanner::getWorkgroupMembers( const TQString &workgroup, const TQString &master, const TQString &ip )
{
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Hosts ).tqarg( workgroup, master, ip ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).arg( Hosts ).arg( workgroup, master, ip ) ) );
}


@@ -170,7 +170,7 @@ void Smb4KScanner::getWorkgroupMembers( const TQString &workgroup, const TQStrin

void Smb4KScanner::getShares( const TQString &workgroup, const TQString &host, const TQString &ip, const TQString &protocol )
{
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).tqarg( Shares ).tqarg( workgroup, host, ip ).tqarg( protocol ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).arg( Shares ).arg( workgroup, host, ip ).arg( protocol ) ) );
}


@@ -194,7 +194,7 @@ void Smb4KScanner::getInfo( const TQString &workgroup, const TQString &host, con
item->setInfoChecked( true );
}

m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Info ).tqarg( workgroup, host, ip ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).arg( Info ).arg( workgroup, host, ip ) ) );
}


@@ -215,7 +215,7 @@ void Smb4KScanner::search( const TQString &host )
return;
}

m_queue.enqueue( new TQString( TQString( "%1:%2" ).tqarg( Search ).tqarg( host ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2" ).arg( Search ).arg( host ) ) );
}


@@ -268,7 +268,7 @@ void Smb4KScanner::scanNetwork()
command.append( optionsHandler()->nmblookupOptions() );
command.append( " -- - | grep '<01>' | awk '{print $1}'" );
command.append( !optionsHandler()->winsServer().isEmpty() ?
TQString( " | xargs nmblookup -R -U %1 -A " ).tqarg( optionsHandler()->winsServer() ) :
TQString( " | xargs nmblookup -R -U %1 -A " ).arg( optionsHandler()->winsServer() ) :
" | xargs nmblookup -A " );
command.append( optionsHandler()->nmblookupOptions() );

@@ -386,7 +386,7 @@ void Smb4KScanner::scanForWorkgroupMembers( const TQString &workgroup, const TQS

if ( !authInfo.user().isEmpty() )
{
command.append( TQString( " -U %1" ).tqarg( KProcess::quote( authInfo.user() ) ) );
command.append( TQString( " -U %1" ).arg( KProcess::quote( authInfo.user() ) ) );

if ( !authInfo.password().isEmpty() )
{
@@ -417,7 +417,7 @@ void Smb4KScanner::scanForWorkgroupMembers( const TQString &workgroup, const TQS

if ( !authInfo.user().isEmpty() )
{
command.append( TQString( " -U %1'" ).tqarg( KProcess::quote( authInfo.user() ) ) );
command.append( TQString( " -U %1'" ).arg( KProcess::quote( authInfo.user() ) ) );

if ( !authInfo.password().isEmpty() )
{
@@ -450,16 +450,16 @@ void Smb4KScanner::scanForShares( const TQString &workgroup, const TQString &hos

TQString command;

command = TQString( "net %1 -w %2 -S %3" ).tqarg( optionsHandler()->netOptions( Smb4KSambaOptionsHandler::Share, host, protocol ) ).tqarg( KProcess::quote( workgroup ), KProcess::quote( host ) );
command = TQString( "net %1 -w %2 -S %3" ).arg( optionsHandler()->netOptions( Smb4KSambaOptionsHandler::Share, host, protocol ) ).arg( KProcess::quote( workgroup ), KProcess::quote( host ) );

if ( !ip.isEmpty() )
{
command.append( TQString( " -I %1" ).tqarg( KProcess::quote( ip ) ) );
command.append( TQString( " -I %1" ).arg( KProcess::quote( ip ) ) );
}

if ( !auth->user().isEmpty() )
{
command.append( TQString( " -U %1" ).tqarg( KProcess::quote( auth->user() ) ) );
command.append( TQString( " -U %1" ).arg( KProcess::quote( auth->user() ) ) );

if ( !auth->password().isEmpty() )
{
@@ -491,11 +491,11 @@ void Smb4KScanner::scanForInfo( const TQString &workgroup, const TQString &host,

TQString smbclient_options = optionsHandler()->smbclientOptions();

TQString command = TQString( "smbclient -d1 -U guest% -W %1 -L %2" ).tqarg( KProcess::quote( workgroup ) ).tqarg( KProcess::quote( host ) );
TQString command = TQString( "smbclient -d1 -U guest% -W %1 -L %2" ).arg( KProcess::quote( workgroup ) ).arg( KProcess::quote( host ) );

if ( !ip.isEmpty() )
{
command.append( TQString( " -I %1" ).tqarg( KProcess::quote( ip ) ) );
command.append( TQString( " -I %1" ).arg( KProcess::quote( ip ) ) );
}

if ( !smbclient_options.stripWhiteSpace().isEmpty() )
@@ -550,22 +550,22 @@ void Smb4KScanner::searchForHost( const TQString &host )
{
if ( !wins.isEmpty() )
{
command.append( TQString( " -R -U %1 %2 -S | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( wins ).tqarg( m_priv->host() ) );
command.append( TQString( " -R -U %1 %2 -S | grep '<00>' | sed -e 's/<00>.*//'" ).arg( wins ).arg( m_priv->host() ) );
}
else
{
command.append( TQString( " %1 -S | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( m_priv->host() ) );
command.append( TQString( " %1 -S | grep '<00>' | sed -e 's/<00>.*//'" ).arg( m_priv->host() ) );
}
}
else
{
if ( !wins.isEmpty() )
{
command.append( TQString( " -R -U %1 %2 -A | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( wins ).tqarg( m_priv->host() ) );
command.append( TQString( " -R -U %1 %2 -A | grep '<00>' | sed -e 's/<00>.*//'" ).arg( wins ).arg( m_priv->host() ) );
}
else
{
command.append( TQString( " %1 -A | grep '<00>' | sed -e 's/<00>.*//'" ).tqarg( m_priv->host() ) );
command.append( TQString( " %1 -A | grep '<00>' | sed -e 's/<00>.*//'" ).arg( m_priv->host() ) );
}
}

@@ -573,7 +573,7 @@ void Smb4KScanner::searchForHost( const TQString &host )
}
case Smb4KSettings::EnumSearchMethod::Smbclient:
{
command = TQString( "smbclient -d2 -U % -L %1" ).tqarg( m_priv->host() );
command = TQString( "smbclient -d2 -U % -L %1" ).arg( m_priv->host() );

if ( !smbclient_options.stripWhiteSpace().isEmpty() )
{
@@ -908,7 +908,7 @@ void Smb4KScanner::processWorkgroupMembers()
TQString(), Smb4KPasswordHandler::AccessDenied,
kapp->mainWidget() ? kapp->mainWidget() : 0, "AskPass" ) )
{
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Hosts ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).arg( Hosts ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) );
}

return;
@@ -1090,7 +1090,7 @@ void Smb4KScanner::processWorkgroupMembers()
TQString(), Smb4KPasswordHandler::AccessDenied,
kapp->mainWidget() ? kapp->mainWidget() : 0, "AskPass" ) )
{
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).tqarg( Hosts ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4" ).arg( Hosts ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip() ) ) );
}

return;
@@ -1187,7 +1187,7 @@ void Smb4KScanner::processShares()

if ( passwordHandler()->askpass( m_priv->workgroup(), m_priv->host(), TQString(), Smb4KPasswordHandler::AccessDenied, kapp->mainWidget() ? kapp->mainWidget() : 0, "AskPass" ) )
{
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).tqarg( Shares ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), TQString() ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).arg( Shares ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), TQString() ) ) );
}

return;
@@ -1196,7 +1196,7 @@ void Smb4KScanner::processShares()
{
// FIXME: Does this error only occur when we scan a server that is
// only capable of the RAP protocol or also under other conditions?
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).tqarg( Shares ).tqarg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), "rap" ) ) );
m_queue.enqueue( new TQString( TQString( "%1:%2:%3:%4:%5" ).arg( Shares ).arg( m_priv->workgroup(), m_priv->host(), m_priv->ip(), "rap" ) ) );

m_priv->retry = true;

@@ -1324,7 +1324,7 @@ void Smb4KScanner::processSearch()
{
if ( data.count() > 1 && !data[1].isEmpty() )
{
if ( m_buffer.contains( TQString( "Connection to %1 failed" ).tqarg( m_priv->host() ) ) != 0 )
if ( m_buffer.contains( TQString( "Connection to %1 failed" ).arg( m_priv->host() ) ) != 0 )
{
emit searchResult( new Smb4KHostItem() );
}


+ 419
- 419
smb4k/core/smb4ksettings.cpp
File diff suppressed because it is too large
View File


+ 6
- 6
smb4k/core/smb4ksynchronizer.cpp View File

@@ -286,7 +286,7 @@ const TQString Smb4KSynchronizer::readRsyncOptions()
}

options.append( Smb4KSettings::useMaximumDelete() ?
" --max-delete="+TQString( "%1" ).tqarg( Smb4KSettings::maximumDeleteValue() ) :
" --max-delete="+TQString( "%1" ).arg( Smb4KSettings::maximumDeleteValue() ) :
"" );

options.append( Smb4KSettings::useChecksum() ?
@@ -294,11 +294,11 @@ const TQString Smb4KSynchronizer::readRsyncOptions()
"" );

options.append( Smb4KSettings::useBlockSize() ?
" --block-size="+TQString( "%1" ).tqarg( Smb4KSettings::blockSize() ) :
" --block-size="+TQString( "%1" ).arg( Smb4KSettings::blockSize() ) :
"" );

options.append( Smb4KSettings::useChecksumSeed() ?
" --checksum-seed="+TQString( "%1" ).tqarg( Smb4KSettings::checksumSeed() ) :
" --checksum-seed="+TQString( "%1" ).arg( Smb4KSettings::checksumSeed() ) :
"" );

if ( !Smb4KSettings::customFilteringRules().isEmpty() )