SocketAPI: do not have a special case for UPDATE_VIEW on windows

This is a relique on the old times when there was no persistant connection
in the windows plugin
This commit is contained in:
Olivier Goffart 2014-10-21 14:57:50 +02:00
parent 98c5871d38
commit dc13e39bb1
3 changed files with 1 additions and 18 deletions

View file

@ -253,11 +253,7 @@ void SocketApi::slotUpdateFolderView(const QString& alias)
f->syncResult().status() == SyncResult::Problem ||
f->syncResult().status() == SyncResult::Error ||
f->syncResult().status() == SyncResult::SetupError ) {
if( Utility::isWindows() ) {
Utility::winShellChangeNotify( f->path() );
} else {
broadcastMessage(QLatin1String("UPDATE_VIEW"), f->path() );
}
broadcastMessage(QLatin1String("UPDATE_VIEW"), f->path() );
} else {
qDebug() << "Not sending UPDATE_VIEW for" << alias << "because status() is" << f->syncResult().status();
}

View file

@ -372,17 +372,6 @@ bool Utility::isLinux()
#endif
}
void Utility::winShellChangeNotify( const QString& path )
{
#ifdef Q_OS_WIN
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT,
reinterpret_cast<const wchar_t *>(QDir::toNativeSeparators(path).utf16()), NULL );
#else
Q_UNUSED(path);
qDebug() << Q_FUNC_INFO << " is not implemented on non Windows systems.";
#endif
}
static const char STOPWATCH_END_TAG[] = "_STOPWATCH_END";

View file

@ -63,8 +63,6 @@ namespace Utility
OWNCLOUDSYNC_EXPORT QDateTime qDateTimeFromTime_t(qint64 t);
OWNCLOUDSYNC_EXPORT qint64 qDateTimeToTime_t(const QDateTime &t);
OWNCLOUDSYNC_EXPORT void winShellChangeNotify( const QString& path );
/**
* @brief Convert milliseconds to HMS string.
* @param quint64 msecs the milliseconds to convert to string.