Skip to content

Commit 91211e0

Browse files
committed
Version 1.0.13
2 parents a30d503 + ea2b64f commit 91211e0

File tree

681 files changed

+45670
-51007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

681 files changed

+45670
-51007
lines changed

Application.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
#include <config.h>
3434
#include <QtCore/QDir>
3535

36-
Application::Application(int& argc, char** argv)
37-
: QApplication(argc, argv),
38-
m_currentLocale("en") {
36+
Application::Application(int& argc, char** argv) : QApplication(argc, argv), m_currentLocale("en") {
3937
initTranslations();
4038
}
4139

@@ -73,20 +71,15 @@ const QString& Application::getCurrentLocale() const {
7371
}
7472

7573
std::list<QString> Application::getLanguagesList() const {
76-
std::list<QString> list{ "en" };
77-
std::transform(m_translationsMap.begin(), m_translationsMap.end(),
78-
std::back_inserter(list),
79-
[](const std::pair<QString, QString>& val) {
80-
return val.first;
81-
});
74+
std::list<QString> list{"en"};
75+
std::transform(m_translationsMap.begin(), m_translationsMap.end(), std::back_inserter(list),
76+
[](const std::pair<QString, QString>& val) { return val.first; });
8277

8378
return list;
8479
}
8580

8681
void Application::initTranslations() {
87-
const QStringList translation_dirs(
88-
QString::fromUtf8(TRANSLATION_DIRS).split(QChar(':'), QString::SkipEmptyParts)
89-
);
82+
const QStringList translation_dirs(QString::fromUtf8(TRANSLATION_DIRS).split(QChar(':'), QString::SkipEmptyParts));
9083

9184
const QStringList language_file_filter("scantailor_*.qm");
9285
for (const QString& path : translation_dirs) {

Application.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "OutputFileNameGenerator.h"
2929

3030
class Application : public QApplication {
31-
Q_OBJECT
31+
Q_OBJECT
3232
public:
3333
Application(int& argc, char** argv);
3434

AtomicFileOverwriter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,3 @@ void AtomicFileOverwriter::abort() {
7070
m_ptrTempFile.reset(); // See comments in commit()
7171
QFile::remove(temp_file_path);
7272
}
73-

AtomicFileOverwriter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class QTemporaryFile;
3434
* in the same directory as the target file.
3535
*/
3636
class AtomicFileOverwriter {
37-
DECLARE_NON_COPYABLE(AtomicFileOverwriter)
37+
DECLARE_NON_COPYABLE(AtomicFileOverwriter)
3838

3939
public:
4040
AtomicFileOverwriter();

AutoManualMode.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
#ifndef AUTOMANUALMODE_H_
2020
#define AUTOMANUALMODE_H_
2121

22-
enum AutoManualMode {
23-
MODE_AUTO,
24-
MODE_MANUAL
25-
};
22+
enum AutoManualMode { MODE_AUTO, MODE_MANUAL };
2623

2724
#endif

BackgroundExecutor.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ class BackgroundExecutor::Impl : public QThread {
5656

5757
/*============================ BackgroundExecutor ==========================*/
5858

59-
BackgroundExecutor::BackgroundExecutor()
60-
: m_ptrImpl(new Impl(*this)) {
59+
BackgroundExecutor::BackgroundExecutor() : m_ptrImpl(new Impl(*this)) {
6160
}
6261

6362
BackgroundExecutor::~BackgroundExecutor() = default;
@@ -74,8 +73,7 @@ void BackgroundExecutor::enqueueTask(const TaskPtr& task) {
7473

7574
/*===================== BackgroundExecutor::Dispatcher =====================*/
7675

77-
BackgroundExecutor::Dispatcher::Dispatcher(Impl& owner)
78-
: m_rOwner(owner) {
76+
BackgroundExecutor::Dispatcher::Dispatcher(Impl& owner) : m_rOwner(owner) {
7977
}
8078

8179
void BackgroundExecutor::Dispatcher::customEvent(QEvent* event) {
@@ -88,9 +86,7 @@ void BackgroundExecutor::Dispatcher::customEvent(QEvent* event) {
8886

8987
const TaskResultPtr result((*task)());
9088
if (result) {
91-
QCoreApplication::postEvent(
92-
&m_rOwner, new ResultEvent(result)
93-
);
89+
QCoreApplication::postEvent(&m_rOwner, new ResultEvent(result));
9490
}
9591
} catch (const std::bad_alloc&) {
9692
OutOfMemoryHandler::instance().handleOutOfMemorySituation();
@@ -100,9 +96,7 @@ void BackgroundExecutor::Dispatcher::customEvent(QEvent* event) {
10096
/*======================= BackgroundExecutor::Impl =========================*/
10197

10298
BackgroundExecutor::Impl::Impl(BackgroundExecutor& owner)
103-
: m_rOwner(owner),
104-
m_dispatcher(*this),
105-
m_threadStarted(false) {
99+
: m_rOwner(owner), m_dispatcher(*this), m_threadStarted(false) {
106100
m_dispatcher.moveToThread(this);
107101
}
108102

@@ -132,4 +126,3 @@ void BackgroundExecutor::Impl::customEvent(QEvent* event) {
132126

133127
(*result)();
134128
}
135-

BackgroundExecutor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <memory>
2727

2828
class BackgroundExecutor {
29-
DECLARE_NON_COPYABLE(BackgroundExecutor)
29+
DECLARE_NON_COPYABLE(BackgroundExecutor)
3030

3131
public:
3232
typedef intrusive_ptr<AbstractCommand0<void>> TaskResultPtr;

BackgroundTask.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ void BackgroundTask::throwIfCancelled() const {
2727
throw CancelledException();
2828
}
2929
}
30-

BackgroundTask.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,15 @@
2828

2929
class BackgroundTask : public AbstractCommand0<FilterResultPtr>, public TaskStatus {
3030
public:
31-
enum Type {
32-
INTERACTIVE,
33-
BATCH
34-
};
31+
enum Type { INTERACTIVE, BATCH };
3532

3633
class CancelledException : public std::exception {
3734
public:
3835
const char* what() const throw() override;
3936
};
4037

4138

42-
explicit BackgroundTask(Type type)
43-
: m_type(type) {
39+
explicit BackgroundTask(Type type) : m_type(type) {
4440
}
4541

4642
Type type() const {

BasicImageView.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@
2222
#include "BasicImageView.h"
2323

2424
BasicImageView::BasicImageView(const QImage& image, const ImagePixmapUnion& downscaled_image, const Margins& margins)
25-
: ImageViewBase(
26-
image, downscaled_image,
27-
ImagePresentation(QTransform(), QRectF(image.rect())), margins
28-
),
25+
: ImageViewBase(image, downscaled_image, ImagePresentation(QTransform(), QRectF(image.rect())), margins),
2926
m_dragHandler(*this),
3027
m_zoomHandler(*this) {
3128
rootInteractionHandler().makeLastFollower(m_dragHandler);
3229
rootInteractionHandler().makeLastFollower(m_zoomHandler);
3330
}
3431

3532
BasicImageView::~BasicImageView() = default;
36-

0 commit comments

Comments
 (0)