Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -51,8 +51,7 @@ public:
|
|||||||
class AvInit
|
class AvInit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AvInit()
|
AvInit() {
|
||||||
{
|
|
||||||
av_register_all();
|
av_register_all();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -52,8 +52,7 @@ void ClientManager::showPinDialog(QString name, int pin)
|
|||||||
|
|
||||||
void ClientManager::start()
|
void ClientManager::start()
|
||||||
{
|
{
|
||||||
if(VitaMTP_Init() < 0)
|
if(VitaMTP_Init() < 0) {
|
||||||
{
|
|
||||||
emit messageSent(tr("Cannot initialize VitaMTP library"));
|
emit messageSent(tr("Cannot initialize VitaMTP library"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -149,8 +149,7 @@ int CmaClient::deviceRegistered(const char *deviceid)
|
|||||||
int CmaClient::generatePin(wireless_vita_info_t *info, int *p_err)
|
int CmaClient::generatePin(wireless_vita_info_t *info, int *p_err)
|
||||||
{
|
{
|
||||||
qDebug("Registration request from %s (MAC: %s)", info->name, info->mac_addr);
|
qDebug("Registration request from %s (MAC: %s)", info->name, info->mac_addr);
|
||||||
// generate correct values on 32bit
|
int pin = rand() % 10000 * 10000 | rand() % 10000;
|
||||||
int pin = ((qrand() << 16) | qrand()) % 100000000;
|
|
||||||
qDebug("Your registration PIN for %s is: %08d", info->name, pin);
|
qDebug("Your registration PIN for %s is: %08d", info->name, pin);
|
||||||
*p_err = 0;
|
*p_err = 0;
|
||||||
emit this_object->receivedPin(info->name, pin);
|
emit this_object->receivedPin(info->name, pin);
|
||||||
|
@@ -613,7 +613,7 @@ void CmaEvent::vitaEventGetSettingInfo(vita_event_t *event, int eventId)
|
|||||||
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
|
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
|
||||||
|
|
||||||
if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
|
if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
|
||||||
db->setUUID(settingsinfo->current_account.accountId);
|
db->setUUID(settingsinfo->current_account.accountId);
|
||||||
// set the database to be updated ASAP
|
// set the database to be updated ASAP
|
||||||
emit refreshDatabase();
|
emit refreshDatabase();
|
||||||
}
|
}
|
||||||
|
@@ -25,8 +25,7 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QSignalMapper>
|
#include <QSignalMapper>
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui {
|
||||||
{
|
|
||||||
class ConfigWidget;
|
class ConfigWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -446,8 +446,7 @@ int Database::filterObjects(int ohfiParent, metadata_t **p_head, int index, int
|
|||||||
for(map_list::iterator root = object_list.begin(); root != object_list.end(); ++root) {
|
for(map_list::iterator root = object_list.begin(); root != object_list.end(); ++root) {
|
||||||
for(root_list::iterator object = (*root).begin(); object != (*root).end(); ++object) {
|
for(root_list::iterator object = (*root).begin(); object != (*root).end(); ++object) {
|
||||||
if(acceptFilteredObject(parent, *object, type)) {
|
if(acceptFilteredObject(parent, *object, type)) {
|
||||||
if(offset++ >= index)
|
if(offset++ >= index) {
|
||||||
{
|
|
||||||
tail->next_metadata = &(*object)->metadata;
|
tail->next_metadata = &(*object)->metadata;
|
||||||
tail = tail->next_metadata;
|
tail = tail->next_metadata;
|
||||||
numObjects++;
|
numObjects++;
|
||||||
|
@@ -25,7 +25,8 @@ SfoReader::SfoReader()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SfoReader::load(const QString &path) {
|
bool SfoReader::load(const QString &path)
|
||||||
|
{
|
||||||
QFile file(path);
|
QFile file(path);
|
||||||
if(file.open(QIODevice::ReadOnly)) {
|
if(file.open(QIODevice::ReadOnly)) {
|
||||||
data = file.readAll();
|
data = file.readAll();
|
||||||
@@ -37,7 +38,8 @@ bool SfoReader::load(const QString &path) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *SfoReader::value(const char *key, const char *defaultValue) {
|
const char *SfoReader::value(const char *key, const char *defaultValue)
|
||||||
|
{
|
||||||
const char *base_key = key_offset + header->key_offset;
|
const char *base_key = key_offset + header->key_offset;
|
||||||
for(uint i = 0; i < header->pair_count; i++) {
|
for(uint i = 0; i < header->pair_count; i++) {
|
||||||
const char *curr_key = base_key + index[i].key_offset;
|
const char *curr_key = base_key + index[i].key_offset;
|
||||||
|
Reference in New Issue
Block a user