[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [smb4k] /: Remove the ability to exclude IPC$ and/or ADMIN$ shares from being
From: Alexander Reinholdt <alexander.reinholdt () kdemail ! net>
Date: 2014-01-26 10:33:53
Message-ID: E1W7N2H-0007hq-GN () scm ! kde ! org
[Download RAW message or body]
Git commit f3463be31276bd401ad99e945a0f2fc716d120b3 by Alexander Reinholdt.
Committed on 26/01/2014 at 10:31.
Pushed by areinholdt into branch 'master'.
Remove the ability to exclude IPC$ and/or ADMIN$ shares from being
displayed when hidden shares should be listed.
This change also includes the removal of Smb4KShare::isIPC() and
Smb4KShare::isADMIN().
M +0 -10 core/smb4k.kcfg
M +0 -12 core/smb4kshare.cpp
M +0 -16 core/smb4kshare.h
M +3 -16 smb4k/browser/smb4knetworkbrowser_part.cpp
M +0 -23 smb4k/configdlg/smb4kuserinterfaceoptionspage.cpp
M +0 -9 smb4k/configdlg/smb4kuserinterfaceoptionspage.h
http://commits.kde.org/smb4k/f3463be31276bd401ad99e945a0f2fc716d120b3
diff --git a/core/smb4k.kcfg b/core/smb4k.kcfg
index 719bd0e..05e1698 100644
--- a/core/smb4k.kcfg
+++ b/core/smb4k.kcfg
@@ -48,16 +48,6 @@
<whatsthis>Hidden shares will be displayed in the network browser. Hidden \
shares are ending with a $ sign, e.g. Musik$ or IPC$.</whatsthis> \
<default>true</default> </entry>
- <entry name="ShowHiddenIPCShares" type="Bool">
- <label>Show hidden IPC$ shares</label>
- <whatsthis>Hidden IPC$ shares will be displayed in the network \
browser.</whatsthis>
- <default>true</default>
- </entry>
- <entry name="ShowHiddenADMINShares" type="Bool">
- <label>Show hidden ADMIN$ shares</label>
- <whatsthis>Hidden ADMIN$ shares will be displayed in the network \
browser.</whatsthis>
- <default>true</default>
- </entry>
<entry name="ShowType" type="Bool">
<label>Show the type of the share</label>
<whatsthis>The type of a share will be displayed in a separate column in the \
network browser. It can either be Disk, Print or IPC.</whatsthis>
diff --git a/core/smb4kshare.cpp b/core/smb4kshare.cpp
index 17b74bf..bcf0e23 100644
--- a/core/smb4kshare.cpp
+++ b/core/smb4kshare.cpp
@@ -406,18 +406,6 @@ bool Smb4KShare::isPrinter() const
}
-bool Smb4KShare::isIPC() const
-{
- return (QString::compare( d->url.path(), "IPC$" ) == 0);
-}
-
-
-bool Smb4KShare::isADMIN() const
-{
- return (QString::compare( d->url.path(), "ADMIN$" ) == 0);
-}
-
-
void Smb4KShare::setPath( const QString &mountpoint )
{
d->path = mountpoint;
diff --git a/core/smb4kshare.h b/core/smb4kshare.h
index 10455a5..c2880b3 100644
--- a/core/smb4kshare.h
+++ b/core/smb4kshare.h
@@ -286,22 +286,6 @@ class KDE_EXPORT Smb4KShare : public Smb4KBasicNetworkItem
bool isPrinter() const;
/**
- * If the share is an IPC$ share this function returns TRUE and FALSE
- * otherwise.
- *
- * @returns TRUE if the share is an IPC share.
- */
- bool isIPC() const;
-
- /**
- * If the share is an ADMIN$ share this function returns TRUE and FALSE
- * otherwise.
- *
- * @returns TRUE if the share is an ADMIN share.
- */
- bool isADMIN() const;
-
- /**
* Sets the path aka mount point of the share as gathered by the mounter.
*
* @param mountpoint The mount point of the share.
diff --git a/smb4k/browser/smb4knetworkbrowser_part.cpp \
b/smb4k/browser/smb4knetworkbrowser_part.cpp index 87b1c2a..ccb0f12 100644
--- a/smb4k/browser/smb4knetworkbrowser_part.cpp
+++ b/smb4k/browser/smb4knetworkbrowser_part.cpp
@@ -1295,9 +1295,7 @@ void Smb4KNetworkBrowserPart::slotShares( Smb4KHost *host, \
const QList<Smb4KShar {
if ( Smb4KSettings::showHiddenShares() )
{
- if ( (share_item->shareItem()->isPrinter() && \
Smb4KSettings::showPrinterShares()) ||
- (share_item->shareItem()->isIPC() && \
Smb4KSettings::showHiddenIPCShares()) ||
- (share_item->shareItem()->isADMIN() && \
Smb4KSettings::showHiddenADMINShares()) ) + if ( \
share_item->shareItem()->isPrinter() && Smb4KSettings::showPrinterShares() ) {
share_item->update( list.at( j ) );
}
@@ -1340,10 +1338,7 @@ void Smb4KNetworkBrowserPart::slotShares( Smb4KHost *host, \
const QList<Smb4KShar {
if ( Smb4KSettings::showHiddenShares() )
{
- if ( (!list.at( j )->isPrinter() && !list.at( j )->isIPC() && \
!list.at( j )->isADMIN()) ||
- (list.at( j )->isPrinter() && \
Smb4KSettings::showPrinterShares()) ||
- (list.at( j )->isIPC() && \
Smb4KSettings::showHiddenIPCShares()) ||
- (list.at( j )->isADMIN() && \
Smb4KSettings::showHiddenADMINShares()) ) + if ( !list.at( j \
)->isPrinter() || (list.at( j )->isPrinter() && Smb4KSettings::showPrinterShares()) ) \
{
(void) new Smb4KNetworkBrowserItem( network_item, list.at( j ) \
); }
@@ -1398,15 +1393,7 @@ void Smb4KNetworkBrowserPart::slotShares( Smb4KHost *host, \
const QList<Smb4KShar }
else
{
- if ( (!Smb4KSettings::showHiddenIPCShares() && \
share_item->shareItem()->isIPC()) ||
- (!Smb4KSettings::showHiddenADMINShares() && \
share_item->shareItem()->isADMIN()) )
- {
- break;
- }
- else
- {
- // Do nothing
- }
+ // Do nothing
}
found_share = true;
diff --git a/smb4k/configdlg/smb4kuserinterfaceoptionspage.cpp \
b/smb4k/configdlg/smb4kuserinterfaceoptionspage.cpp index 828f2df..8b904a4 100644
--- a/smb4k/configdlg/smb4kuserinterfaceoptionspage.cpp
+++ b/smb4k/configdlg/smb4kuserinterfaceoptionspage.cpp
@@ -122,18 +122,8 @@ Smb4KUserInterfaceOptionsPage::Smb4KUserInterfaceOptionsPage( \
QWidget *parent ) remote_shares_box );
show_hidden->setObjectName( "kcfg_ShowHiddenShares" );
- QCheckBox *show_ipc = new QCheckBox( \
Smb4KSettings::self()->showHiddenIPCSharesItem()->label(),
- remote_shares_box );
- show_ipc->setObjectName( "kcfg_ShowHiddenIPCShares" );
-
- QCheckBox *show_admin = new QCheckBox( \
Smb4KSettings::self()->showHiddenADMINSharesItem()->label(),
- remote_shares_box );
- show_admin->setObjectName( "kcfg_ShowHiddenADMINShares" );
-
shares_layout->addWidget( show_printers, 0, 0, 0 );
shares_layout->addWidget( show_hidden, 0, 1, 0 );
- shares_layout->addWidget( show_ipc, 1, 0, 0 );
- shares_layout->addWidget( show_admin, 1, 1, 0 );
// Columns
QGroupBox *columns_box = new QGroupBox( i18n( "Columns" ), \
network_browser_tab ); @@ -325,13 +315,6 @@ \
Smb4KUserInterfaceOptionsPage::Smb4KUserInterfaceOptionsPage( QWidget *parent ) \
preview_layout->addItem( spacer5, 1, 0, 1, 1, 0 );
insertTab( PreviewDialogTab, preview_tab, i18n( "Preview Dialog" ) );
-
- // Add connections:
- connect( show_hidden, SIGNAL(clicked(bool)),
- this, SLOT(slotShowHiddenClicked(bool)) );
-
- // Do last adjustments:
- slotShowHiddenClicked( Smb4KSettings::showHiddenShares() );
}
@@ -345,10 +328,4 @@ Smb4KUserInterfaceOptionsPage::~Smb4KUserInterfaceOptionsPage()
/////////////////////////////////////////////////////////////////////////////
-void Smb4KUserInterfaceOptionsPage::slotShowHiddenClicked( bool checked )
-{
- findChild<QCheckBox *>( "kcfg_ShowHiddenIPCShares" )->setEnabled( checked );
- findChild<QCheckBox *>( "kcfg_ShowHiddenADMINShares" )->setEnabled( checked );
-}
-
#include "smb4kuserinterfaceoptionspage.moc"
diff --git a/smb4k/configdlg/smb4kuserinterfaceoptionspage.h \
b/smb4k/configdlg/smb4kuserinterfaceoptionspage.h index e884105..ae13118 100644
--- a/smb4k/configdlg/smb4kuserinterfaceoptionspage.h
+++ b/smb4k/configdlg/smb4kuserinterfaceoptionspage.h
@@ -63,15 +63,6 @@ class Smb4KUserInterfaceOptionsPage : public KTabWidget
* The destructor
*/
~Smb4KUserInterfaceOptionsPage();
-
- protected slots:
- /**
- * Enables/disables buttons according to the toggle state of the
- * "Show hidden shares" button.
- *
- * @param checked TRUE if the check box is checked.
- */
- void slotShowHiddenClicked( bool checked );
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic