mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-14 22:55:32 +08:00
Replace QString with const QString&
This commit is contained in:
+8
-8
@@ -872,7 +872,7 @@ void Mifare::data_clearKey(bool clearAll)
|
||||
}
|
||||
}
|
||||
|
||||
bool Mifare::data_isKeyValid(const QString &key)
|
||||
bool Mifare::data_isKeyValid(const QString& key)
|
||||
{
|
||||
if(key.length() != 12)
|
||||
return false;
|
||||
@@ -938,7 +938,7 @@ void Mifare::setCardType(int type)
|
||||
}
|
||||
}
|
||||
|
||||
bool Mifare::data_loadDataFile(const QString &filename)
|
||||
bool Mifare::data_loadDataFile(const QString& filename)
|
||||
{
|
||||
QFile file(filename, this);
|
||||
if(file.open(QIODevice::ReadOnly))
|
||||
@@ -985,7 +985,7 @@ bool Mifare::data_loadDataFile(const QString &filename)
|
||||
}
|
||||
}
|
||||
|
||||
bool Mifare::data_loadKeyFile(const QString &filename)
|
||||
bool Mifare::data_loadKeyFile(const QString& filename)
|
||||
{
|
||||
QFile file(filename, this);
|
||||
if(file.open(QIODevice::ReadOnly))
|
||||
@@ -1022,7 +1022,7 @@ bool Mifare::data_loadKeyFile(const QString &filename)
|
||||
}
|
||||
}
|
||||
|
||||
QString Mifare::bin2text(const QByteArray &buff, int i, int length)
|
||||
QString Mifare::bin2text(const QByteArray& buff, int i, int length)
|
||||
{
|
||||
QString ret = "";
|
||||
char LByte, RByte;
|
||||
@@ -1040,7 +1040,7 @@ QString Mifare::bin2text(const QByteArray &buff, int i, int length)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Mifare::data_saveDataFile(const QString &filename, bool isBin)
|
||||
bool Mifare::data_saveDataFile(const QString& filename, bool isBin)
|
||||
{
|
||||
QFile file(filename, this);
|
||||
if(file.open(QIODevice::WriteOnly))
|
||||
@@ -1084,7 +1084,7 @@ bool Mifare::data_saveDataFile(const QString &filename, bool isBin)
|
||||
}
|
||||
}
|
||||
|
||||
bool Mifare::data_saveKeyFile(const QString &filename, bool isBin)
|
||||
bool Mifare::data_saveKeyFile(const QString& filename, bool isBin)
|
||||
{
|
||||
QFile file(filename, this);
|
||||
if(file.open(QIODevice::WriteOnly))
|
||||
@@ -1179,12 +1179,12 @@ void Mifare::data_data2Key()
|
||||
}
|
||||
}
|
||||
|
||||
void Mifare::data_setData(int block, const QString &data)
|
||||
void Mifare::data_setData(int block, const QString& data)
|
||||
{
|
||||
dataList->replace(block, data);
|
||||
}
|
||||
|
||||
void Mifare::data_setKey(int sector, KeyType keyType, const QString &key)
|
||||
void Mifare::data_setKey(int sector, KeyType keyType, const QString& key)
|
||||
{
|
||||
if(keyType == KEY_A)
|
||||
keyAList->replace(sector, key);
|
||||
|
||||
+5
-5
@@ -106,9 +106,9 @@ public:
|
||||
void saveSniff(const QString& file);
|
||||
void data_fillKeys();
|
||||
|
||||
static QList<quint8> data_getACBits(const QString &text);
|
||||
static QList<quint8> data_getACBits(const QString& text);
|
||||
static int data_b2s(int block);
|
||||
static bool data_isACBitsValid(const QString &text, QList<quint8> *returnHalfBytes = nullptr);
|
||||
static bool data_isACBitsValid(const QString& text, QList<quint8> *returnHalfBytes = nullptr);
|
||||
public slots:
|
||||
signals:
|
||||
|
||||
@@ -125,9 +125,9 @@ private:
|
||||
QRegularExpression* keyPattern;
|
||||
QString bin2text(const QByteArray& buff, int start, int length);
|
||||
|
||||
QString _readblk(int blockId, KeyType keyType, const QString &key, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
QStringList _readsec(int sectorId, KeyType keyType, const QString &key, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
bool _writeblk(int blockId, KeyType keyType, const QString &key, const QString &data, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
QString _readblk(int blockId, KeyType keyType, const QString& key, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
QStringList _readsec(int sectorId, KeyType keyType, const QString& key, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
bool _writeblk(int blockId, KeyType keyType, const QString& key, const QString& data, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
};
|
||||
|
||||
#endif // MIFARE_H
|
||||
|
||||
Reference in New Issue
Block a user