Adjust uncrustify config, reformat all but Mac client

There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).

The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
This commit is contained in:
Mike Gelfand
2017-04-19 15:04:45 +03:00
parent fdfbe225da
commit d7930984ef
297 changed files with 69885 additions and 63878 deletions

View File

@@ -20,66 +20,65 @@ class QSortFilterProxyModel;
class FileTreeDelegate;
class FileTreeModel;
class FileTreeView: public QTreeView
class FileTreeView : public QTreeView
{
Q_OBJECT
public:
FileTreeView (QWidget * parent = nullptr, bool editable = true);
public:
FileTreeView(QWidget* parent = nullptr, bool editable = true);
void clear ();
void update (const FileList& files, bool updateProperties = true);
void clear();
void update(const FileList& files, bool updateProperties = true);
void setEditable (bool editable);
void setEditable(bool editable);
signals:
void priorityChanged (const QSet<int>& fileIndices, int priority);
void wantedChanged (const QSet<int>& fileIndices, bool wanted);
void pathEdited (const QString& oldpath, const QString& newname);
void openRequested (const QString& path);
signals:
void priorityChanged(const QSet<int>& fileIndices, int priority);
void wantedChanged(const QSet<int>& fileIndices, bool wanted);
void pathEdited(const QString& oldpath, const QString& newname);
void openRequested(const QString& path);
protected:
protected:
// QWidget
virtual void resizeEvent (QResizeEvent * event);
virtual void keyPressEvent (QKeyEvent * event);
virtual void mouseDoubleClickEvent (QMouseEvent * event);
virtual void contextMenuEvent (QContextMenuEvent * event);
virtual void resizeEvent(QResizeEvent* event);
virtual void keyPressEvent(QKeyEvent* event);
virtual void mouseDoubleClickEvent(QMouseEvent* event);
virtual void contextMenuEvent(QContextMenuEvent* event);
// QAbstractItemView
virtual bool edit (const QModelIndex& index, EditTrigger trigger, QEvent * event);
virtual bool edit(const QModelIndex& index, EditTrigger trigger, QEvent* event);
private slots:
void onClicked (const QModelIndex& index);
private slots:
void onClicked(const QModelIndex& index);
void checkSelectedItems ();
void uncheckSelectedItems ();
void onlyCheckSelectedItems ();
void setSelectedItemsPriority ();
bool openSelectedItem ();
void renameSelectedItem ();
void checkSelectedItems();
void uncheckSelectedItems();
void onlyCheckSelectedItems();
void setSelectedItemsPriority();
bool openSelectedItem();
void renameSelectedItem();
void refreshContextMenuActionsSensitivity ();
void refreshContextMenuActionsSensitivity();
private:
void initContextMenu ();
QModelIndexList selectedSourceRows (int column = 0) const;
private:
void initContextMenu();
QModelIndexList selectedSourceRows(int column = 0) const;
static Qt::CheckState getCumulativeCheckState (const QModelIndexList& indices);
static Qt::CheckState getCumulativeCheckState(const QModelIndexList& indices);
private:
FileTreeModel * myModel;
QSortFilterProxyModel * myProxy;
FileTreeDelegate * myDelegate;
private:
FileTreeModel* myModel;
QSortFilterProxyModel* myProxy;
FileTreeDelegate* myDelegate;
QMenu * myContextMenu = nullptr;
QMenu * myPriorityMenu = nullptr;
QAction * myCheckSelectedAction = nullptr;
QAction * myUncheckSelectedAction = nullptr;
QAction * myOnlyCheckSelectedAction = nullptr;
QAction * myHighPriorityAction = nullptr;
QAction * myNormalPriorityAction = nullptr;
QAction * myLowPriorityAction = nullptr;
QAction * myOpenAction = nullptr;
QAction * myRenameAction = nullptr;
QMenu* myContextMenu = nullptr;
QMenu* myPriorityMenu = nullptr;
QAction* myCheckSelectedAction = nullptr;
QAction* myUncheckSelectedAction = nullptr;
QAction* myOnlyCheckSelectedAction = nullptr;
QAction* myHighPriorityAction = nullptr;
QAction* myNormalPriorityAction = nullptr;
QAction* myLowPriorityAction = nullptr;
QAction* myOpenAction = nullptr;
QAction* myRenameAction = nullptr;
};