[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok/spotify] src/core-impl/collections/spotifycollection: Revert "spotify: replace uname call wi
From:       Edward Hades <edward.hades () gmail ! com>
Date:       2012-10-29 12:29:34
Message-ID: 20121029122934.AB20CA6078 () git ! kde ! org
[Download RAW message or body]

Git commit a7f462165a03f16e776881828a69a11a3ed12e36 by Edward Hades.
Committed on 29/10/2012 at 12:38.
Pushed by hades into branch 'spotify'.

Revert "spotify: replace uname call with QHostInfo"

This reverts commit cd3eddcae9a25d4430267abe3ccc098247b9b7dc.

M  +8    -2    src/core-impl/collections/spotifycollection/SpotifyConfig.cpp

http://commits.kde.org/amarok/a7f462165a03f16e776881828a69a11a3ed12e36

diff --git a/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp \
b/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp index \
                f9bee56..3a4b81f 100644
--- a/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp
+++ b/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp
@@ -25,7 +25,7 @@
 #include <KStandardDirs>
 #include <KWallet/Wallet>
 
-#include <QHostInfo>
+#include <sys/utsname.h>
 
 const QString SpotifyConfig::m_resolverDownloadUrl = "http://ofan.me/";
 
@@ -166,7 +166,13 @@ SpotifyConfig::reset()
 const QString
 SpotifyConfig::defaultResolverName()
 {
-    return QString("spotify_resolver_%1").arg( QHostInfo::localHostName() );
+    utsname buf;
+    int res = uname( &buf );
+    QString name = "spotify_resolver_";
+    if( !res )
+        name.append( buf.machine );
+
+    return name;
 }
 
 #include "SpotifyConfig.moc"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic