mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Update files format with clang-format
This commit is contained in:
parent
732ea7ecac
commit
f945c6c5ca
@ -162,8 +162,7 @@ QVariant FolderModel::data(const QModelIndex &index, int role) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
return QVariant(finishedFolderIcon);
|
return QVariant(finishedFolderIcon);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return QVariant(QFileIconProvider().icon(QFileIconProvider::Folder));
|
return QVariant(QFileIconProvider().icon(QFileIconProvider::Folder));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -101,8 +101,7 @@ LibraryWindow::LibraryWindow()
|
|||||||
|
|
||||||
if (libraries.isEmpty()) {
|
if (libraries.isEmpty()) {
|
||||||
showNoLibrariesWidget();
|
showNoLibrariesWidget();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
showRootWidget();
|
showRootWidget();
|
||||||
selectedLibrary->setCurrentIndex(0);
|
selectedLibrary->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
@ -1085,10 +1084,8 @@ void LibraryWindow::loadLibrary(const QString &name)
|
|||||||
|
|
||||||
setRootIndex();
|
setRootIndex();
|
||||||
|
|
||||||
|
|
||||||
libraryToolBar->searchEdit->clear();
|
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);
|
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)
|
if (ret == QMessageBox::Yes)
|
||||||
QDesktopServices::openUrl(QUrl("http://www.yacreader.com"));
|
QDesktopServices::openUrl(QUrl("http://www.yacreader.com"));
|
||||||
@ -1101,8 +1098,7 @@ void LibraryWindow::loadLibrary(const QString &name)
|
|||||||
renameLibraryAction->setEnabled(true);
|
renameLibraryAction->setEnabled(true);
|
||||||
removeLibraryAction->setEnabled(true);
|
removeLibraryAction->setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
comicsViewsManager->comicsView->setModel(nullptr);
|
comicsViewsManager->comicsView->setModel(nullptr);
|
||||||
foldersView->setModel(nullptr);
|
foldersView->setModel(nullptr);
|
||||||
listsView->setModel(nullptr);
|
listsView->setModel(nullptr);
|
||||||
@ -1610,8 +1606,7 @@ void LibraryWindow::checkEmptyFolder()
|
|||||||
{
|
{
|
||||||
if (comicsModel->rowCount() > 0 && !importedCovers) {
|
if (comicsModel->rowCount() > 0 && !importedCovers) {
|
||||||
disableComicsActions(false);
|
disableComicsActions(false);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
disableComicsActions(true);
|
disableComicsActions(true);
|
||||||
|
|
||||||
if (libraryToolBar->toggleFullScreenAction != nullptr) {
|
if (libraryToolBar->toggleFullScreenAction != nullptr) {
|
||||||
@ -1847,12 +1842,10 @@ void LibraryWindow::rename(QString newName) //TODO replace
|
|||||||
if (!foldersModelProxy->mapToSource(foldersView->currentIndex()).isValid())
|
if (!foldersModelProxy->mapToSource(foldersView->currentIndex()).isValid())
|
||||||
libraryToolBar->setTitle(selectedLibrary->currentText());
|
libraryToolBar->setTitle(selectedLibrary->currentText());
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
libraryAlreadyExists(newName);
|
libraryAlreadyExists(newName);
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
renameLibraryDialog->close();
|
renameLibraryDialog->close();
|
||||||
//selectedLibrary->setCurrentIndex(selectedLibrary->findText(newName));
|
//selectedLibrary->setCurrentIndex(selectedLibrary->findText(newName));
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,4 @@
|
|||||||
|
|
||||||
Theme::Theme()
|
Theme::Theme()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,8 @@ class Theme
|
|||||||
public:
|
public:
|
||||||
Theme();
|
Theme();
|
||||||
|
|
||||||
static Theme currentTheme() {
|
static Theme currentTheme()
|
||||||
|
{
|
||||||
Theme t;
|
Theme t;
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
@ -243,7 +244,8 @@ public:
|
|||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
void configureComicsGridView(QQmlContext *ctxt) {
|
void configureComicsGridView(QQmlContext *ctxt)
|
||||||
|
{
|
||||||
ctxt->setContextProperty("backgroundColor", gridComicsViewBackgroundColor);
|
ctxt->setContextProperty("backgroundColor", gridComicsViewBackgroundColor);
|
||||||
ctxt->setContextProperty("cellColor", gridComicsViewCellColor);
|
ctxt->setContextProperty("cellColor", gridComicsViewCellColor);
|
||||||
ctxt->setContextProperty("selectedColor", gridComicsViewSelectedColor);
|
ctxt->setContextProperty("selectedColor", gridComicsViewSelectedColor);
|
||||||
@ -269,7 +271,8 @@ public:
|
|||||||
ctxt->setContextProperty("currentComicBackgroundColor", gridComicsViewCurrentComicBackground);
|
ctxt->setContextProperty("currentComicBackgroundColor", gridComicsViewCurrentComicBackground);
|
||||||
}
|
}
|
||||||
|
|
||||||
void configureInfoView(QQmlContext *ctxt) {
|
void configureInfoView(QQmlContext *ctxt)
|
||||||
|
{
|
||||||
ctxt->setContextProperty("infoBackgroundColor", infoViewInfoBackgroundColor);
|
ctxt->setContextProperty("infoBackgroundColor", infoViewInfoBackgroundColor);
|
||||||
ctxt->setContextProperty("topShadow", infoViewTopShadow);
|
ctxt->setContextProperty("topShadow", infoViewTopShadow);
|
||||||
ctxt->setContextProperty("infoShadow", infoViewInfoShadow);
|
ctxt->setContextProperty("infoShadow", infoViewInfoShadow);
|
||||||
|
@ -173,8 +173,7 @@ void YACReaderComicsViewsManager::switchToComicsView(ComicsView *from, ComicsVie
|
|||||||
//load content into current view
|
//load content into current view
|
||||||
libraryWindow->loadCoversFromCurrentModel();
|
libraryWindow->loadCoversFromCurrentModel();
|
||||||
|
|
||||||
if (!libraryWindow->libraryToolBar->searchEdit->text().isEmpty())
|
if (!libraryWindow->libraryToolBar->searchEdit->text().isEmpty()) {
|
||||||
{
|
|
||||||
comicsView->enableFilterMode(true);
|
comicsView->enableFilterMode(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,6 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
YACReaderMainToolBar *defaultToolbar = nullptr;
|
YACReaderMainToolBar *defaultToolbar = nullptr;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // YACREADER_LIBRARY_TOOLBAR_H
|
#endif // YACREADER_LIBRARY_TOOLBAR_H
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
|
|
||||||
|
|
||||||
YACReaderTreeView::YACReaderTreeView(QWidget *parent)
|
YACReaderTreeView::YACReaderTreeView(QWidget *parent)
|
||||||
: QTreeView(parent)
|
: QTreeView(parent)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user