Update files format with clang-format

This commit is contained in:
Luis Ángel San Martín 2019-06-01 18:44:35 +02:00 committed by Luis Ángel San Martín
parent 732ea7ecac
commit f945c6c5ca
23 changed files with 104 additions and 114 deletions

View File

@ -162,8 +162,7 @@ QVariant FolderModel::data(const QModelIndex &index, int role) const
}
return QVariant(finishedFolderIcon);
}
else {
} else {
return QVariant(QFileIconProvider().icon(QFileIconProvider::Folder));
}
} else {

View File

@ -101,8 +101,7 @@ LibraryWindow::LibraryWindow()
if (libraries.isEmpty()) {
showNoLibrariesWidget();
}
else {
} else {
showRootWidget();
selectedLibrary->setCurrentIndex(0);
}
@ -1085,10 +1084,8 @@ void LibraryWindow::loadLibrary(const QString &name)
setRootIndex();
libraryToolBar->searchEdit->clear();
}
else if(comparation > 0) {
} else if (comparation > 0) {
int ret = QMessageBox::question(this, tr("Download new version"), tr("This library was created with a newer version of YACReaderLibrary. Download the new version now?"), QMessageBox::Yes, QMessageBox::No);
if (ret == QMessageBox::Yes)
QDesktopServices::openUrl(QUrl("http://www.yacreader.com"));
@ -1101,8 +1098,7 @@ void LibraryWindow::loadLibrary(const QString &name)
renameLibraryAction->setEnabled(true);
removeLibraryAction->setEnabled(true);
}
}
else {
} else {
comicsViewsManager->comicsView->setModel(nullptr);
foldersView->setModel(nullptr);
listsView->setModel(nullptr);
@ -1610,8 +1606,7 @@ void LibraryWindow::checkEmptyFolder()
{
if (comicsModel->rowCount() > 0 && !importedCovers) {
disableComicsActions(false);
}
else {
} else {
disableComicsActions(true);
if (libraryToolBar->toggleFullScreenAction != nullptr) {
@ -1847,12 +1842,10 @@ void LibraryWindow::rename(QString newName) //TODO replace
if (!foldersModelProxy->mapToSource(foldersView->currentIndex()).isValid())
libraryToolBar->setTitle(selectedLibrary->currentText());
}
}
else {
} else {
libraryAlreadyExists(newName);
}
}
else
} else
renameLibraryDialog->close();
//selectedLibrary->setCurrentIndex(selectedLibrary->findText(newName));
}

View File

@ -2,5 +2,4 @@
Theme::Theme()
{
}

View File

@ -10,7 +10,8 @@ class Theme
public:
Theme();
static Theme currentTheme() {
static Theme currentTheme()
{
Theme t;
#ifdef Q_OS_MAC
@ -243,7 +244,8 @@ public:
return t;
}
void configureComicsGridView(QQmlContext *ctxt) {
void configureComicsGridView(QQmlContext *ctxt)
{
ctxt->setContextProperty("backgroundColor", gridComicsViewBackgroundColor);
ctxt->setContextProperty("cellColor", gridComicsViewCellColor);
ctxt->setContextProperty("selectedColor", gridComicsViewSelectedColor);
@ -269,7 +271,8 @@ public:
ctxt->setContextProperty("currentComicBackgroundColor", gridComicsViewCurrentComicBackground);
}
void configureInfoView(QQmlContext *ctxt) {
void configureInfoView(QQmlContext *ctxt)
{
ctxt->setContextProperty("infoBackgroundColor", infoViewInfoBackgroundColor);
ctxt->setContextProperty("topShadow", infoViewTopShadow);
ctxt->setContextProperty("infoShadow", infoViewInfoShadow);

View File

@ -173,8 +173,7 @@ void YACReaderComicsViewsManager::switchToComicsView(ComicsView *from, ComicsVie
//load content into current view
libraryWindow->loadCoversFromCurrentModel();
if (!libraryWindow->libraryToolBar->searchEdit->text().isEmpty())
{
if (!libraryWindow->libraryToolBar->searchEdit->text().isEmpty()) {
comicsView->enableFilterMode(true);
}
}

View File

@ -50,8 +50,6 @@ private:
#endif
YACReaderMainToolBar *defaultToolbar = nullptr;
};
#endif // YACREADER_LIBRARY_TOOLBAR_H

View File

@ -2,7 +2,6 @@
#include "theme.h"
YACReaderTreeView::YACReaderTreeView(QWidget *parent)
: QTreeView(parent)
{