This commit is contained in:
Patrick von Reth 2014-02-10 20:16:15 +01:00
parent 8c4bdbe3ae
commit a0b5f45273
2 changed files with 3 additions and 4 deletions

View File

@ -51,6 +51,8 @@ public:
static const QList<SnorePlugin::PluginTypes> &types();
private:
static QHash<SnorePlugin::PluginTypes, QHash<QString,PluginContainer*> > s_pluginCache;
void static updatePluginCache();
static const QDir &pluginDir();
static inline const QString pluginExtention()
@ -63,9 +65,6 @@ private:
return QLatin1String("dylib");
#endif
}
static QHash<SnorePlugin::PluginTypes, QHash<QString,PluginContainer*> > s_pluginCache;
static inline QSettings &cache()
{
static QSettings *_cache = NULL;

View File

@ -128,7 +128,7 @@ void SnarlNetworkFrontend::handleMessages()
void SnarlNetworkFrontend::callback(Notification &sn, const QString msg)
{
QTcpSocket *client = (QTcpSocket*)qvariant_cast<QObject*>(sn.hints().privateValue(this, "clientSocket"));
QTcpSocket *client = qobject_cast<QTcpSocket*>(sn.hints().privateValue(this, "clientSocket").value<QObject*>());
if(client && !msg.isEmpty())
{
write(client, QString("%1%2\r\n").arg(msg, QString::number(sn.id())));