Fixed android compilation.

Version bump.
Fixed file size problem under windows.
Updated changelog.
This commit is contained in:
codestation
2014-06-28 00:26:14 -04:30
parent ce9353e4f3
commit 36a91d78aa
15 changed files with 326 additions and 210 deletions

View File

@@ -1,3 +1,10 @@
qcma (0.3.3) unstable; urgency=low
* Fixed wrong file sizes under windows.
* Fixed compilation with android toolchain.
-- codestation <codestation404@gmail.com> Thu, 28 Jun 2014 00:00:00 -0000
qcma (0.3.2) unstable; urgency=low qcma (0.3.2) unstable; urgency=low
* Fixed bug with PSP savedata transfer. * Fixed bug with PSP savedata transfer.

View File

@@ -5,10 +5,15 @@
#------------------------------------------------- #-------------------------------------------------
TEMPLATE = subdirs TEMPLATE = subdirs
android {
SUBDIRS = qcma_android.pro
} else {
SUBDIRS = qcma_gui.pro SUBDIRS = qcma_gui.pro
}
# Compile the headless binary only on Linux because it depends on dbus # Compile the headless binary only on Linux because it depends on dbus
unix:!macx { unix:!macx:!android {
SUBDIRS += qcma_cli.pro SUBDIRS += qcma_cli.pro
} }

View File

@@ -1,6 +1,6 @@
include(qcma_common.pri) include(qcma_common.pri)
QT += dbus unix:!macx:QT += dbus
TARGET = qcma_cli TARGET = qcma_cli

View File

@@ -6,7 +6,7 @@
QT += core network sql QT += core network sql
VERSION = 0.3.2 VERSION = 0.3.3
TEMPLATE = app TEMPLATE = app
@@ -51,7 +51,7 @@ OTHER_FILES += \
qcma.rc qcma.rc
INCLUDEPATH += src/ INCLUDEPATH += src/
QT_CONFIG -= no-pkg-config
RESOURCES += qcmares.qrc translations.qrc RESOURCES += qcmares.qrc translations.qrc
# find packages using pkg-config # find packages using pkg-config

View File

@@ -6,7 +6,7 @@ Name: qcma
Summary: PSVita Content Manager Assistant Summary: PSVita Content Manager Assistant
License: GPL-3.0 License: GPL-3.0
Release: 1 Release: 1
Version: 0.3.2 Version: 0.3.3
URL: https://github.com/codestation/qcma URL: https://github.com/codestation/qcma
Source: https://github.com/codestation/qcma.git Source: https://github.com/codestation/qcma.git
Group: Productivity/File utilities Group: Productivity/File utilities

View File

@@ -6,7 +6,7 @@ Name: qcma
Summary: PSVita Content Manager Assistant Summary: PSVita Content Manager Assistant
License: GPL-3.0 License: GPL-3.0
Release: 1 Release: 1
Version: 0.3.2 Version: 0.3.3
URL: https://github.com/codestation/qcma URL: https://github.com/codestation/qcma
Source: https://github.com/codestation/qcma.git Source: https://github.com/codestation/qcma.git
Group: Productivity/File utilities Group: Productivity/File utilities

View File

@@ -1,45 +0,0 @@
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2013 Codestation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "androidmessage.h"
#include <QtAndroidExtras/QAndroidJniObject>
AndroidMessage::AndroidMessage(QObject *parent) :
QObject(parent)
{
}
void AndroidMessage::showToast(const QString &message)
{
QAndroidJniObject javaMessage = QAndroidJniObject::fromString(message);
QAndroidJniObject::callStaticMethod<void>("com/github/codestation/qcma/QcmaNotification",
"showToast",
"(Ljava/lang/String;)V",
javaMessage.object<jstring>());
}
void AndroidMessage::showDialog(const QString &message)
{
QAndroidJniObject javaMessage = QAndroidJniObject::fromString(message);
QAndroidJniObject::callStaticMethod<void>("com/github/codestation/qcma/QcmaNotification",
"showDialog",
"(Ljava/lang/String;)V",
javaMessage.object<jstring>());
}

View File

@@ -1,36 +0,0 @@
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2013 Codestation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ANDROIDMESSAGE_H
#define ANDROIDMESSAGE_H
#include <QObject>
class AndroidMessage : public QObject
{
Q_OBJECT
public:
explicit AndroidMessage(QObject *parent = 0);
public slots:
void showToast(const QString &message);
void showDialog(const QString &message);
};
#endif // ANDROIDMESSAGE_H

View File

@@ -452,7 +452,7 @@ void CmaEvent::vitaEventSendObject(vita_event_t *event, int eventId)
quint32 handle; quint32 handle;
do { do {
unsigned long len = metadata->size; quint64 len = metadata->size;
m_file = new QFile(m_db->getAbsolutePath(metadata->ohfi)); m_file = new QFile(m_db->getAbsolutePath(metadata->ohfi));
// read the file to send if it's not a directory // read the file to send if it's not a directory
@@ -477,7 +477,7 @@ void CmaEvent::vitaEventSendObject(vita_event_t *event, int eventId)
} }
// send the data over // send the data over
qDebug("Sending %s of %lu bytes to device", metadata->name, len); qDebug("Sending %s of %llu bytes to device", metadata->name, len);
qDebug("OHFI %d with handle 0x%08X", metadata->ohfi, parentHandle); qDebug("OHFI %d with handle 0x%08X", metadata->ohfi, parentHandle);
VitaMTP_RegisterCancelEventId(eventId); VitaMTP_RegisterCancelEventId(eventId);

View File

@@ -186,7 +186,6 @@ void CMAObject::updateObjectSize(qint64 size)
if(parent) { if(parent) {
parent->updateObjectSize(size); parent->updateObjectSize(size);
} }
//FIXME: size should be quint64
metadata.size += size; metadata.size += size;
} }

View File

@@ -27,14 +27,11 @@
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
#include <windows.h> #include <windows.h>
#else #elif defined Q_OS_ANDROID
#ifndef __ANDROID__
#include <sys/statvfs.h>
#else
#include <sys/vfs.h> #include <sys/vfs.h>
#define statvfs statfs #define statvfs statfs
#define fstatvfs fstatfs #else
#endif #include <sys/statvfs.h>
#endif #endif
bool getDiskSpace(const QString &dir, quint64 *free, quint64 *total) bool getDiskSpace(const QString &dir, quint64 *free, quint64 *total)

View File

@@ -14,12 +14,33 @@
<string>Backup Manager</string> <string>Backup Manager</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QTabWidget" name="tabWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="backupTab">
<attribute name="title">
<string>Backup Manager</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QTableWidget" name="tableWidget">
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Online ID / Username</string> <string>Online ID / Username</string>
</property> </property>
@@ -31,12 +52,12 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QFormLayout" name="formLayout_2"> <layout class="QFormLayout" name="formLayout_4">
<property name="fieldGrowthPolicy"> <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum> <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>Backup Type</string> <string>Backup Type</string>
</property> </property>
@@ -84,14 +105,6 @@
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QTableWidget" name="tableWidget">
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="usageLabel"> <widget class="QLabel" name="usageLabel">
@@ -127,6 +140,182 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="downloadTab">
<property name="enabled">
<bool>false</bool>
</property>
<attribute name="title">
<string>Download List</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Console</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox">
<item>
<property name="text">
<string>PS Vita</string>
</property>
</item>
<item>
<property name="text">
<string>PSP</string>
</property>
</item>
<item>
<property name="text">
<string>Other</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Content</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_2">
<item>
<property name="text">
<string>Games</string>
</property>
</item>
<item>
<property name="text">
<string>Demos</string>
</property>
</item>
<item>
<property name="text">
<string>DLC</string>
</property>
</item>
<item>
<property name="text">
<string>Other</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Status</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_3">
<item>
<property name="text">
<string>New</string>
</property>
</item>
<item>
<property name="text">
<string>Downloading</string>
</property>
</item>
<item>
<property name="text">
<string>Completed</string>
</property>
</item>
<item>
<property name="text">
<string>Paused</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="usernameEdit"/>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="passwordEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refreshButton">
<property name="text">
<string>Refresh</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidget"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_3"/>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Resume All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Pause All</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>FilterLineEdit</class> <class>FilterLineEdit</class>

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>520</width> <width>520</width>
<height>437</height> <height>450</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">

View File

@@ -31,8 +31,8 @@ QMutex HTTPDownloader::dataAvailable;
QMutex HTTPDownloader::dataRead; QMutex HTTPDownloader::dataRead;
char *HTTPDownloader::buffer = NULL; char *HTTPDownloader::buffer = NULL;
unsigned long HTTPDownloader::bufferSize = 0; qint64 HTTPDownloader::bufferSize = 0;
unsigned long HTTPDownloader::downloadLeft = 0; qint64 HTTPDownloader::downloadLeft = 0;
HTTPDownloader::HTTPDownloader(const QString &url, QObject *parent) : HTTPDownloader::HTTPDownloader(const QString &url, QObject *parent) :
QObject(parent), remote_url(url), firstRead(true) QObject(parent), remote_url(url), firstRead(true)

View File

@@ -58,8 +58,8 @@ private:
volatile static qint64 m_contentLength; volatile static qint64 m_contentLength;
static char *buffer; static char *buffer;
static unsigned long bufferSize; static qint64 bufferSize;
static unsigned long downloadLeft; static qint64 downloadLeft;
}; };
#endif // HTTPDOWNLOADER_H #endif // HTTPDOWNLOADER_H