Commit ec972526 authored by Méven Car's avatar Méven Car
Browse files

Fix Windows build

Build was broken with
730a5936
parent 5d34421d
......@@ -35,6 +35,10 @@
#include <QEventLoop>
#include <QDebug>
#ifdef Q_OS_WIN
#include <sys/stat.h>
#endif
// static const char NetworkIconName[] = "network-workgroup";
......@@ -270,7 +274,11 @@ void NetworkSlave::feedEntryAsNetwork( KIO::UDSEntry* entry )
entry->fastInsert( KIO::UDSEntry::UDS_DISPLAY_NAME, i18n("Network"));
// entry->fastInsert( KIO::UDSEntry::UDS_ICON_NAME, NetworkIconName );
entry->fastInsert( KIO::UDSEntry::UDS_MIME_TYPE, QLatin1String(Mimetypes::NetworkMimetype) );
#ifdef Q_OS_WIN
entry->fastInsert( KIO::UDSEntry::UDS_ACCESS, _S_IREAD | _S_IWRITE );
#else
entry->fastInsert( KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR );
#endif
}
void NetworkSlave::feedEntryAsDevice( KIO::UDSEntry* entry, const Mollet::NetDevice& deviceData )
......@@ -279,7 +287,11 @@ void NetworkSlave::feedEntryAsDevice( KIO::UDSEntry* entry, const Mollet::NetDev
entry->fastInsert( KIO::UDSEntry::UDS_NAME, deviceData.hostAddress() );
entry->fastInsert( KIO::UDSEntry::UDS_DISPLAY_NAME, deviceData.name() );
entry->fastInsert( KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR );
#ifdef Q_OS_WIN
entry->fastInsert( KIO::UDSEntry::UDS_ACCESS, _S_IREAD | _S_IWRITE );
#else
entry->fastInsert( KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR );
#endif
// entry->fastInsert( KIO::UDSEntry::UDS_ICON_NAME, NetDevice::iconName(deviceData.type()) );
entry->fastInsert( KIO::UDSEntry::UDS_MIME_TYPE, QLatin1String(Mimetypes::DeviceMimetype[deviceData.type()]) );
}
......
......@@ -15,6 +15,10 @@
#include <stdio.h>
#ifdef Q_OS_WIN
#include <sys/stat.h>
#endif
extern "C" int Q_DECL_EXPORT kdemain(int argc, char **argv)
{
// necessary to use other kio slaves
......@@ -155,8 +159,11 @@ void RecentDocuments::stat(const QUrl& url)
uds.fastInsert(KIO::UDSEntry::UDS_ICON_NAME, QString::fromLatin1("document-open-recent"));
uds.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
uds.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, QString::fromLatin1("inode/directory"));
uds.fastInsert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR);
#ifdef Q_OS_WIN
uds.fastInsert(KIO::UDSEntry::UDS_ACCESS, _S_IREAD | _S_IWRITE );
#else
uds.fastInsert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR );
#endif
statEntry(uds);
finished();
}
......
......@@ -33,6 +33,10 @@
#include <KActivities/Stats/ResultModel>
#include <KActivities/Stats/Terms>
#ifdef Q_OS_WIN
#include <sys/stat.h>
#endif
namespace KAStats = KActivities::Stats;
using namespace KAStats;
......@@ -229,7 +233,11 @@ KIO::UDSEntry RecentlyUsed::udsEntryForRoot(const QString &dirName, const QStrin
uds.fastInsert(KIO::UDSEntry::UDS_ICON_NAME, iconName);
uds.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
uds.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, QStringLiteral("inode/directory"));
uds.fastInsert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR);
#ifdef Q_OS_WIN
uds.fastInsert(KIO::UDSEntry::UDS_ACCESS, _S_IREAD | _S_IWRITE );
#else
uds.fastInsert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR );
#endif
return uds;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment