Review Request: Adding patch for checking url is remote or not and check the network status as per the TODO in folderview.cpp
Aaron J. Seigo
aseigo at kde.org
Wed Dec 14 08:32:08 UTC 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103393/#review8951
-----------------------------------------------------------
plasma/applets/folderview/folderview.cpp
<http://git.reviewboard.kde.org/r/103393/#comment7433>
FolderView is an Applet; you don't need to quality the call with Plasma::Applet:: ... just showMessage is enough. (also, spaces after the commas :)
plasma/applets/folderview/folderview.cpp
<http://git.reviewboard.kde.org/r/103393/#comment7432>
this will prevent the connect statement below from being made. the connect statement should precede the status check.
also, the syntax is wrong. the object (list) should be the third argument and you can not pass in arguments like m_url. the arguments come from the signal. so in this case you need to create a new slot method in FolderView to connect shouldConnect to, something like:
connect(Solid::Networking::notifier(), SIGNAL(shouldConnect()), this, SLOT(networkAvailable()));
and then:
void FolderView::networkAvailable()
{
if (!m_url.isLocalFile()) {
lister->openUrl(m_url);
}
}
plasma/applets/folderview/folderview.cpp
<http://git.reviewboard.kde.org/r/103393/#comment7434>
there should be a disconnect statement here that mirrors the connect statement in !isLocalFile() branch.
this way when the url changes from remote to local in the config, the signal is no longer listened for.
- Aaron J. Seigo
On Dec. 14, 2011, 3:21 a.m., Sujith Haridasan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103393/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2011, 3:21 a.m.)
>
>
> Review request for Plasma.
>
>
> Description
> -------
>
> Adding patch for the TODO, mentioned in the folderview.cpp file. This patch looks whether the url is local or remote. If its remote then checks for the network status of the host machine. If the host machine is not connected to the network then returns.
>
>
> Diffs
> -----
>
> plasma/applets/folderview/folderview.cpp 43d0511
>
> Diff: http://git.reviewboard.kde.org/r/103393/diff/diff
>
>
> Testing
> -------
>
> Tested by removing the host from the network and by adding the host to the network.
>
>
> Thanks,
>
> Sujith Haridasan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111214/73594373/attachment-0001.html>
More information about the Plasma-devel
mailing list