mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-23 13:11:12 -05:00
Add missing Q_DECLARE_TR_FUNCTIONS to Kdbx classes
Remove obsolete Kdbx3XmlWriter header
This commit is contained in:
parent
0a876c8af9
commit
7a4e74950c
@ -32,10 +32,12 @@ elif [ "$1" == "update" ]; then
|
|||||||
PULL=false
|
PULL=false
|
||||||
elif [ "$1" != "" ]; then
|
elif [ "$1" != "" ]; then
|
||||||
echo "Unknown command '${1}'"
|
echo "Unknown command '${1}'"
|
||||||
echo "Usage: $(basename $0) [update|pull|push]"
|
echo "Usage: $(basename $0) [update|pull|push] [additional tx options]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
shift
|
||||||
|
|
||||||
cd "${BASEDIR}/../.."
|
cd "${BASEDIR}/../.."
|
||||||
|
|
||||||
if $UPDATE; then
|
if $UPDATE; then
|
||||||
@ -53,12 +55,12 @@ fi
|
|||||||
|
|
||||||
if $PUSH; then
|
if $PUSH; then
|
||||||
echo "Pushing English source files to Transifex..."
|
echo "Pushing English source files to Transifex..."
|
||||||
tx push -s
|
tx push -s $@
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $PULL; then
|
if $PULL; then
|
||||||
echo "Pulling translations from Transifex..."
|
echo "Pulling translations from Transifex..."
|
||||||
tx pull -af --minimum-perc=40
|
tx pull -af --minimum-perc=40 $@
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
*/
|
*/
|
||||||
class Kdbx3Reader: public KdbxReader
|
class Kdbx3Reader: public KdbxReader
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Kdbx3Reader)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData,
|
Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData,
|
||||||
const CompositeKey& key, bool keepDatabase) override;
|
const CompositeKey& key, bool keepDatabase) override;
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
*/
|
*/
|
||||||
class Kdbx3Writer: public KdbxWriter
|
class Kdbx3Writer: public KdbxWriter
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Kdbx3Writer)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool writeDatabase(QIODevice* device, Database* db) override;
|
bool writeDatabase(QIODevice* device, Database* db) override;
|
||||||
};
|
};
|
||||||
|
@ -1,91 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
|
||||||
* Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
|
||||||
*
|
|
||||||
* 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 2 or (at your option)
|
|
||||||
* version 3 of the License.
|
|
||||||
*
|
|
||||||
* 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 KEEPASSX_KDBX3XMLWRITER_H
|
|
||||||
#define KEEPASSX_KDBX3XMLWRITER_H
|
|
||||||
|
|
||||||
#include <QColor>
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QImage>
|
|
||||||
#include <QXmlStreamWriter>
|
|
||||||
|
|
||||||
#include "core/Database.h"
|
|
||||||
#include "core/Entry.h"
|
|
||||||
#include "core/Group.h"
|
|
||||||
#include "core/TimeInfo.h"
|
|
||||||
#include "core/Uuid.h"
|
|
||||||
|
|
||||||
class KeePass2RandomStream;
|
|
||||||
class Metadata;
|
|
||||||
|
|
||||||
class Kdbx3XmlWriter
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Kdbx3XmlWriter();
|
|
||||||
void writeDatabase(QIODevice* device, Database* db, KeePass2RandomStream* randomStream = nullptr,
|
|
||||||
const QByteArray& headerHash = QByteArray());
|
|
||||||
void writeDatabase(const QString& filename, Database* db);
|
|
||||||
bool hasError();
|
|
||||||
QString errorString();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void generateIdMap();
|
|
||||||
|
|
||||||
void writeMetadata();
|
|
||||||
void writeMemoryProtection();
|
|
||||||
void writeCustomIcons();
|
|
||||||
void writeIcon(const Uuid& uuid, const QImage& icon);
|
|
||||||
void writeBinaries();
|
|
||||||
void writeCustomData();
|
|
||||||
void writeCustomDataItem(const QString& key, const QString& value);
|
|
||||||
void writeRoot();
|
|
||||||
void writeGroup(const Group* group);
|
|
||||||
void writeTimes(const TimeInfo& ti);
|
|
||||||
void writeDeletedObjects();
|
|
||||||
void writeDeletedObject(const DeletedObject& delObj);
|
|
||||||
void writeEntry(const Entry* entry);
|
|
||||||
void writeAutoType(const Entry* entry);
|
|
||||||
void writeAutoTypeAssoc(const AutoTypeAssociations::Association& assoc);
|
|
||||||
void writeEntryHistory(const Entry* entry);
|
|
||||||
|
|
||||||
void writeString(const QString& qualifiedName, const QString& string);
|
|
||||||
void writeNumber(const QString& qualifiedName, int number);
|
|
||||||
void writeBool(const QString& qualifiedName, bool b);
|
|
||||||
void writeDateTime(const QString& qualifiedName, const QDateTime& dateTime);
|
|
||||||
void writeUuid(const QString& qualifiedName, const Uuid& uuid);
|
|
||||||
void writeUuid(const QString& qualifiedName, const Group* group);
|
|
||||||
void writeUuid(const QString& qualifiedName, const Entry* entry);
|
|
||||||
void writeBinary(const QString& qualifiedName, const QByteArray& ba);
|
|
||||||
void writeColor(const QString& qualifiedName, const QColor& color);
|
|
||||||
void writeTriState(const QString& qualifiedName, Group::TriState triState);
|
|
||||||
QString colorPartToString(int value);
|
|
||||||
QString stripInvalidXml10Chars(QString str);
|
|
||||||
|
|
||||||
void raiseError(const QString& errorMessage);
|
|
||||||
|
|
||||||
QXmlStreamWriter m_xml;
|
|
||||||
Database* m_db;
|
|
||||||
Metadata* m_meta;
|
|
||||||
KeePass2RandomStream* m_randomStream;
|
|
||||||
QByteArray m_headerHash;
|
|
||||||
QHash<QByteArray, int> m_idMap;
|
|
||||||
bool m_error;
|
|
||||||
QString m_errorStr;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // KEEPASSX_KDBX3XMLWRITER_H
|
|
@ -27,6 +27,8 @@
|
|||||||
*/
|
*/
|
||||||
class Kdbx4Reader : public KdbxReader
|
class Kdbx4Reader : public KdbxReader
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Kdbx4Reader)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData,
|
Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData,
|
||||||
const CompositeKey& key, bool keepDatabase) override;
|
const CompositeKey& key, bool keepDatabase) override;
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
*/
|
*/
|
||||||
class Kdbx4Writer : public KdbxWriter
|
class Kdbx4Writer : public KdbxWriter
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Kdbx4Writer)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool writeDatabase(QIODevice* device, Database* db) override;
|
bool writeDatabase(QIODevice* device, Database* db) override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user