Fix stupid bug with function scope.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "capability.h"
|
||||
#include "cmautils.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QHostInfo>
|
||||
@@ -41,7 +42,7 @@ bool DeviceCapability::exchangeInfo(vita_device_t *device)
|
||||
}
|
||||
|
||||
QString hostname = QHostInfo::localHostName();
|
||||
int protocol_version = getProtocolVersion();
|
||||
int protocol_version = ::getVitaProtocolVersion();
|
||||
const initiator_info_t *pc_info = VitaMTP_Data_Initiator_New(hostname.toUtf8().data(), protocol_version);
|
||||
|
||||
// Next, we send the client's (this program) info (discard the const here)
|
||||
|
||||
@@ -86,7 +86,7 @@ void CmaBroadcast::readPendingDatagrams()
|
||||
void CmaBroadcast::setAvailable()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
int protocol_version = getProtocolVersion();
|
||||
int protocol_version = ::getVitaProtocolVersion();
|
||||
|
||||
reply.clear();
|
||||
reply.insert(0, broadcast_reply
|
||||
@@ -100,7 +100,7 @@ void CmaBroadcast::setAvailable()
|
||||
void CmaBroadcast::setUnavailable()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
int protocol_version = QSettings().value("protocolVersion", VITAMTP_PROTOCOL_MAX_VERSION).toInt();
|
||||
int protocol_version = ::getVitaProtocolVersion();
|
||||
|
||||
reply.clear();
|
||||
reply.insert(0, broadcast_reply
|
||||
|
||||
@@ -186,7 +186,7 @@ QString readable_size(qint64 size, bool use_gib)
|
||||
return QString().setNum(size_f,'f',2) + " " + unit;
|
||||
}
|
||||
|
||||
int getProtocolVersion()
|
||||
int getVitaProtocolVersion()
|
||||
{
|
||||
bool useCustom = QSettings().value("useCustomProtocol").toBool();
|
||||
if(useCustom)
|
||||
|
||||
@@ -49,6 +49,6 @@ bool removeRecursively(const QString &path);
|
||||
QString readable_size(qint64 size, bool use_gib = false);
|
||||
bool getDiskSpace(const QString &dir, quint64 *free, quint64 *total);
|
||||
QByteArray getThumbnail(const QString &path, DataType type, metadata_t *metadata);
|
||||
int getProtocolVersion();
|
||||
int getVitaProtocolVersion();
|
||||
|
||||
#endif // UTILS_H
|
||||
|
||||
Reference in New Issue
Block a user