Coding style fixes.

This commit is contained in:
Felix Geyer 2015-10-15 18:02:31 +02:00
parent 5de0ec94e0
commit dff3fc0572
14 changed files with 23 additions and 23 deletions

View File

@ -66,7 +66,7 @@ public:
class KEEPASSX_EXPORT AutoTypeClearField : public AutoTypeAction
{
public:
explicit AutoTypeClearField();
AutoTypeClearField();
AutoTypeAction* clone();
void accept(AutoTypeExecutor* executor);
};

View File

@ -19,7 +19,8 @@
#include "core/Group.h"
QList<Entry*> EntrySearcher::search(const QString &searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity)
QList<Entry*> EntrySearcher::search(const QString& searchTerm, const Group* group,
Qt::CaseSensitivity caseSensitivity)
{
if (!group->resolveSearchingEnabled()) {
return QList<Entry*>();
@ -28,7 +29,8 @@ QList<Entry*> EntrySearcher::search(const QString &searchTerm, const Group* grou
return searchEntries(searchTerm, group, caseSensitivity);
}
QList<Entry*> EntrySearcher::searchEntries(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity)
QList<Entry*> EntrySearcher::searchEntries(const QString& searchTerm, const Group* group,
Qt::CaseSensitivity caseSensitivity)
{
QList<Entry*> searchResult;
@ -44,7 +46,8 @@ QList<Entry*> EntrySearcher::searchEntries(const QString& searchTerm, const Grou
return searchResult;
}
QList<Entry*> EntrySearcher::matchEntry(const QString& searchTerm, Entry* entry, Qt::CaseSensitivity caseSensitivity)
QList<Entry*> EntrySearcher::matchEntry(const QString& searchTerm, Entry* entry,
Qt::CaseSensitivity caseSensitivity)
{
QStringList wordList = searchTerm.split(QRegExp("\\s"), QString::SkipEmptyParts);
Q_FOREACH (const QString& word, wordList) {

View File

@ -28,10 +28,11 @@ class EntrySearcher
{
public:
QList<Entry*> search(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity);
private:
QList<Entry*> searchEntries(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity);
QList<Entry*> matchEntry(const QString& searchTerm, Entry* entry, Qt::CaseSensitivity caseSensitivity);
bool wordMatch(const QString &word, Entry *entry, Qt::CaseSensitivity caseSensitivity);
bool wordMatch(const QString& word, Entry* entry, Qt::CaseSensitivity caseSensitivity);
};
#endif // KEEPASSX_ENTRYSEARCHER_H

View File

@ -27,7 +27,7 @@
class XcbEventFilter : public QAbstractNativeEventFilter
{
public:
virtual bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override
bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override
{
Q_UNUSED(result)

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSX_HEADERVIEWSYNC_H
#define KEEPASSX_HEADERVIEWSYNC_H
#ifndef KEEPASSX_DATABASEWIDGETSTATESYNC_H
#define KEEPASSX_DATABASEWIDGETSTATESYNC_H
#include "gui/DatabaseWidget.h"
@ -51,4 +51,4 @@ private:
QList<int> m_columnSizesSearch;
};
#endif // KEEPASSX_HEADERVIEWSYNC_H
#endif // KEEPASSX_DATABASEWIDGETSTATESYNC_H

View File

@ -29,7 +29,7 @@ public:
explicit DialogyWidget(QWidget* parent = nullptr);
protected:
virtual void keyPressEvent(QKeyEvent* e) override;
void keyPressEvent(QKeyEvent* e) override;
private:
bool clickButton(QDialogButtonBox::StandardButton standardButton);

View File

@ -41,8 +41,8 @@ class CustomIconModel : public QAbstractListModel
public:
explicit CustomIconModel(QObject* parent = nullptr);
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
void setIcons(const QHash<Uuid, QImage>& icons, const QList<Uuid>& iconsOrder);
Uuid uuidFromIndex(const QModelIndex& index) const;
QModelIndex indexFromUuid(const Uuid& uuid) const;

View File

@ -444,7 +444,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
}
}
void MainWindow::changeEvent(QEvent *event)
void MainWindow::changeEvent(QEvent* event)
{
if ((event->type() == QEvent::WindowStateChange) && isMinimized()
&& isTrayIconEnabled() && config()->get("GUI/MinimizeToTray").toBool())

View File

@ -51,7 +51,6 @@ void PasswordComboBox::setEcho(bool echo)
#else
setStyleSheet("QComboBox { font-family: monospace,Courier; }");
#endif
}
else {
// clear items so the combobox indicates that no popup menu is available

View File

@ -74,7 +74,7 @@ void EntryView::setEntryList(const QList<Entry*>& entries)
void EntryView::setFirstEntryActive()
{
if(m_model->rowCount() > 0) {
if (m_model->rowCount() > 0) {
QModelIndex index = m_sortModel->mapToSource(m_sortModel->index(0, 0));
setCurrentEntry(m_model->entryFromIndex(index));
}

View File

@ -94,7 +94,8 @@ QByteArray CompositeKey::transform(const QByteArray& seed, quint64 rounds,
QByteArray key = rawKey();
QFuture<QByteArray> future = QtConcurrent::run(transformKeyRaw, key.left(16), seed, rounds, &okLeft, &errorStringLeft);
QFuture<QByteArray> future = QtConcurrent::run(transformKeyRaw, key.left(16), seed, rounds,
&okLeft, &errorStringLeft);
QByteArray result2 = transformKeyRaw(key.right(16), seed, rounds, &okRight, &errorStringRight);
QByteArray transformed;

View File

@ -51,7 +51,7 @@ void TestCsvExporter::cleanUp()
void TestCsvExporter::testExport()
{
Group* groupRoot = m_db->rootGroup();
Group* group= new Group();
Group* group = new Group();
group->setName("Test Group Name");
group->setParent(groupRoot);
Entry* entry = new Entry();
@ -83,10 +83,10 @@ void TestCsvExporter::testEmptyDatabase()
void TestCsvExporter::testNestedGroups()
{
Group* groupRoot = m_db->rootGroup();
Group* group= new Group();
Group* group = new Group();
group->setName("Test Group Name");
group->setParent(groupRoot);
Group* childGroup= new Group();
Group* childGroup = new Group();
childGroup->setName("Test Sub Group Name");
childGroup->setParent(group);
Entry* entry = new Entry();

View File

@ -42,7 +42,6 @@ private Q_SLOTS:
private:
Database* m_db;
CsvExporter* m_csvExporter;
};
#endif // KEEPASSX_TESTCSVEXPORTER_H

View File

@ -76,6 +76,3 @@ void TestExporter::testToDbExporter()
delete dbOrg;
delete dbExp;
}