From c7722c4078a520e008d37e92e60fed04a653f31e Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Fri, 17 Aug 2018 21:05:01 +0300 Subject: [PATCH] Fix minor EBN issues --- conf/editannottooldialog.cpp | 2 -- core/documentcommands.cpp | 2 +- core/synctex/synctex_parser.c | 20 ++++++++++---------- core/synctex/synctex_parser_advanced.h | 6 +++--- core/synctex/synctex_parser_utils.c | 2 +- doc/CMakeLists.txt | 2 +- generators/poppler/generator_pdf.cpp | 2 +- kdocumentviewer.h | 2 +- ui/annotationpopup.h | 8 ++++---- ui/annotationpropertiesdialog.cpp | 2 +- ui/annotationproxymodels.cpp | 4 ++-- ui/annotationproxymodels.h | 4 ++-- ui/annotwindow.cpp | 2 +- ui/bookmarklist.cpp | 2 +- ui/debug_ui.h | 2 +- ui/fileprinterpreview.cpp | 2 +- ui/magnifierview.cpp | 2 +- ui/minibar.cpp | 2 +- ui/pagepainter.cpp | 2 +- ui/pagepainter.h | 6 +++--- ui/pageviewannotator.cpp | 4 ++-- ui/presentationwidget.cpp | 2 +- ui/side_reviews.cpp | 18 +++++++++--------- ui/side_reviews.h | 6 +++--- ui/snapshottaker.cpp | 2 +- 25 files changed, 53 insertions(+), 55 deletions(-) diff --git a/conf/editannottooldialog.cpp b/conf/editannottooldialog.cpp index 1b8a9e2c6..18b81e1e5 100644 --- a/conf/editannottooldialog.cpp +++ b/conf/editannottooldialog.cpp @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include "core/annotations.h" #include "ui/annotationwidgets.h" diff --git a/core/documentcommands.cpp b/core/documentcommands.cpp index 3b9348bd4..72aec67f5 100644 --- a/core/documentcommands.cpp +++ b/core/documentcommands.cpp @@ -143,7 +143,7 @@ bool RemoveAnnotationCommand::refreshInternalPageReferences( const QVector< Okul if ( !m_done ) { // We don't always update m_annotation because it can happen that the annotation remove has been undo - // and that annotation addition has also been undone so the the annotation pointer is stored inside + // and that annotation addition has also been undone so the annotation pointer is stored inside // a previous AddAnnotationCommand and thus doesn't need updating because it didn't change // because of the document reload auto a = newPagesVector[m_pageNumber]->annotation( m_annotation->uniqueName() ); diff --git a/core/synctex/synctex_parser.c b/core/synctex/synctex_parser.c index 4c1923b9a..f409e158e 100644 --- a/core/synctex/synctex_parser.c +++ b/core/synctex/synctex_parser.c @@ -660,12 +660,12 @@ static synctex_open_s __synctex_open_v2(const char * output, synctex_io_mode_t i quoteless_synctex_name = NULL; } } - /* The operation is successfull, return the arguments by value. */ + /* The operation is successful, return the arguments by value. */ open.status = SYNCTEX_STATUS_OK; return open; } -/* Opens the ouput file, taking into account the eventual build_directory. +/* Opens the output file, taking into account the eventual build_directory. * - returns: an open structure which status is * SYNCTEX_STATUS_OK on success, * SYNCTEX_STATUS_ERROR on failure. @@ -5881,7 +5881,7 @@ synctex_scanner_p synctex_scanner_parse(synctex_scanner_p scanner) { scanner->pre_unit = 8192; scanner->pre_x_offset = scanner->pre_y_offset = 578; /* initialize the offset with a fake unprobable value, - * If there is a post scriptum section, this value will be overriden by the real life value */ + * If there is a post scriptum section, this value will be overridden by the real life value */ scanner->x_offset = scanner->y_offset = 6.027e23f; scanner->reader->line_number = 1; @@ -7368,7 +7368,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2 width = _synctex_data_width(node); min = _synctex_data_h(node); max = min + (width>0?width:-width); - /* We allways have min <= max */ + /* We always have min <= max */ if (hit->hh; /* regions 1+4+7, result is > 0 */ } else if (hit->h>max) { @@ -7382,7 +7382,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2 width = synctex_node_width(node); min = synctex_node_h(node); max = min + (width>0?width:-width); - /* We allways have min <= max */ + /* We always have min <= max */ if (hit->hh; /* regions 1+4+7, result is > 0 */ } else if (hit->h>max) { @@ -7397,7 +7397,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2 width = synctex_node_hbox_width(node); min = synctex_node_hbox_h(node); max = min + (width>0?width:-width); - /* We allways have min <= max */ + /* We always have min <= max */ if (hit->hh; /* regions 1+4+7, result is > 0 */ } else if (hit->h>max) { @@ -7509,7 +7509,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2 min = synctex_node_v(node); max = min + _synctex_abs(_synctex_data_depth(node)); min -= _synctex_abs(_synctex_data_height(node)); - /* We allways have min <= max */ + /* We always have min <= max */ if (hit->vv; /* regions 1+2+3, result is > 0 */ } else if (hit->v>max) { @@ -7523,7 +7523,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2 min = synctex_node_v(node); max = min + _synctex_abs(synctex_node_depth(node)); min -= _synctex_abs(synctex_node_height(node)); - /* We allways have min <= max */ + /* We always have min <= max */ if (hit->vv; /* regions 1+2+3, result is > 0 */ } else if (hit->v>max) { @@ -7540,7 +7540,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2 max = min + (depth>0?depth:-depth); height = synctex_node_hbox_height(node); min -= (height>0?height:-height); - /* We allways have min <= max */ + /* We always have min <= max */ if (hit->vv; /* regions 1+2+3, result is > 0 */ } else if (hit->v>max) { @@ -7556,7 +7556,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2 min = _synctex_data_v(node); max = min + _synctex_abs(_synctex_data_depth(_synctex_tree_parent(node))); min -= _synctex_abs(_synctex_data_height(_synctex_tree_parent(node))); - /* We allways have min <= max */ + /* We always have min <= max */ if (hit->vv; /* regions 1+2+3, result is > 0 */ } else if (hit->v>max) { diff --git a/core/synctex/synctex_parser_advanced.h b/core/synctex/synctex_parser_advanced.h index e395aaff7..b374965a4 100644 --- a/core/synctex/synctex_parser_advanced.h +++ b/core/synctex/synctex_parser_advanced.h @@ -65,7 +65,7 @@ extern "C" { /** * These are the masks for the synctex node types. - * int's are 32 bits at leats. + * int's are 32 bits at least. */ enum { synctex_shift_root, @@ -322,7 +322,7 @@ extern "C" { * Proxies are used to support pdf forms. * The ref primary nodes are replaced by a tree * of proxy nodes which duplicate the tree of primary - * nodes available in the refered form. + * nodes available in the referred form. * Roughly speaking, the primary nodes of the form * know what to display, the proxy nodes know where. * Handles are used in queries. They point to either @@ -447,7 +447,7 @@ extern "C" { */ void synctex_iterator_free(synctex_iterator_p iterator); /** - * Wether the iterator actually points to an object. + * Whether the iterator actually points to an object. * - argument iterator: the object to iterate on... */ synctex_bool_t synctex_iterator_has_next(synctex_iterator_p iterator); diff --git a/core/synctex/synctex_parser_utils.c b/core/synctex/synctex_parser_utils.c index 3c0d63b71..70efcd716 100644 --- a/core/synctex/synctex_parser_utils.c +++ b/core/synctex/synctex_parser_utils.c @@ -323,7 +323,7 @@ int _synctex_copy_with_quoting_last_path_component(const char * src, char ** des if(src && dest_ref) { const char * lpc; # define dest (*dest_ref) - dest = NULL; /* Default behavior: no change and sucess. */ + dest = NULL; /* Default behavior: no change and success. */ lpc = _synctex_last_path_component(src); if(strlen(lpc)) { if(strchr(lpc,' ') && lpc[0]!='"' && lpc[strlen(lpc)-1]!='"') { diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index dd7cc3ded..2e4fab66a 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -2,4 +2,4 @@ # # kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR okular) -kdoctools_create_manpage(man-okular.1.docbook 1 INSTALL_DESTINATION ${KDE_INSTALL_MANDIR}) \ No newline at end of file +kdoctools_create_manpage(man-okular.1.docbook 1 INSTALL_DESTINATION ${KDE_INSTALL_MANDIR}) diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp index 9310b7c2e..fb621c412 100644 --- a/generators/poppler/generator_pdf.cpp +++ b/generators/poppler/generator_pdf.cpp @@ -387,7 +387,7 @@ Okular::Action* createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool // If links should not be deleted it probably means that they // are part of a nextActions chain. There is no support // to resolveMediaLinkReferences on nextActions. It would also - // be neccessary to ensure that resolveMediaLinkReferences does + // be necessary to ensure that resolveMediaLinkReferences does // not delete the Links which are part of a nextActions list // to avoid a double deletion. qCDebug(OkularPdfDebug) << "parsing rendition link without deletion is not supported. Action chain might be broken."; diff --git a/kdocumentviewer.h b/kdocumentviewer.h index d1218879e..02d30ff61 100644 --- a/kdocumentviewer.h +++ b/kdocumentviewer.h @@ -12,7 +12,7 @@ #include "okularpart_export.h" -#include +#include class QUrl; diff --git a/ui/annotationpopup.h b/ui/annotationpopup.h index 424f1de77..9d5b48fbc 100644 --- a/ui/annotationpopup.h +++ b/ui/annotationpopup.h @@ -10,10 +10,10 @@ #ifndef ANNOTATIONPOPUP_H #define ANNOTATIONPOPUP_H -#include -#include -#include -#include +#include +#include +#include +#include namespace Okular { class Annotation; diff --git a/ui/annotationpropertiesdialog.cpp b/ui/annotationpropertiesdialog.cpp index f15032083..1a828b6da 100644 --- a/ui/annotationpropertiesdialog.cpp +++ b/ui/annotationpropertiesdialog.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/ui/annotationproxymodels.cpp b/ui/annotationproxymodels.cpp index eab99dc63..cf5621c0f 100644 --- a/ui/annotationproxymodels.cpp +++ b/ui/annotationproxymodels.cpp @@ -9,8 +9,8 @@ #include "annotationproxymodels.h" -#include -#include +#include +#include #include diff --git a/ui/annotationproxymodels.h b/ui/annotationproxymodels.h index 8b914c25b..13a7448dd 100644 --- a/ui/annotationproxymodels.h +++ b/ui/annotationproxymodels.h @@ -10,8 +10,8 @@ #ifndef ANNOTATIONPROXYMODEL_H #define ANNOTATIONPROXYMODEL_H -#include -#include +#include +#include /** * A proxy model, which filters out all pages except the diff --git a/ui/annotwindow.cpp b/ui/annotwindow.cpp index d069a3c1e..b1bfea64d 100644 --- a/ui/annotwindow.cpp +++ b/ui/annotwindow.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/ui/bookmarklist.cpp b/ui/bookmarklist.cpp index ff26132fc..ebbf3787e 100644 --- a/ui/bookmarklist.cpp +++ b/ui/bookmarklist.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/ui/debug_ui.h b/ui/debug_ui.h index 4d0da5b34..7b8e98358 100644 --- a/ui/debug_ui.h +++ b/ui/debug_ui.h @@ -11,7 +11,7 @@ #ifndef OKULAR_DEBUG_UI_P_H #define OKULAR_DEBUG_UI_P_H -#include +#include Q_DECLARE_LOGGING_CATEGORY(OkularUiDebug) diff --git a/ui/fileprinterpreview.cpp b/ui/fileprinterpreview.cpp index 0ae3aa9b8..ab186e4d0 100644 --- a/ui/fileprinterpreview.cpp +++ b/ui/fileprinterpreview.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "debug_ui.h" diff --git a/ui/magnifierview.cpp b/ui/magnifierview.cpp index c766f9f55..cef941ecf 100644 --- a/ui/magnifierview.cpp +++ b/ui/magnifierview.cpp @@ -175,7 +175,7 @@ void MagnifierView::drawTicks( QPainter *p ) p->drawLine(0, height() - 1, 0, 0); // ticks - // TODO posibility to switch units (pt, mm, cc, in, printing dots) + // TODO possibility to switch units (pt, mm, cc, in, printing dots) float ps = (float)SCALE * 5;// how much pixels in widget is one pixel in document * how often int tw = 10; // tick size in pixels diff --git a/ui/minibar.cpp b/ui/minibar.cpp index df5af1d53..f831176bb 100644 --- a/ui/minibar.cpp +++ b/ui/minibar.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp index f54cf2445..618ff7833 100644 --- a/ui/pagepainter.cpp +++ b/ui/pagepainter.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/ui/pagepainter.h b/ui/pagepainter.h index c3cb3dbf4..94bfc85d7 100644 --- a/ui/pagepainter.h +++ b/ui/pagepainter.h @@ -10,9 +10,9 @@ #ifndef _OKULAR_PAGEPAINTER_H_ #define _OKULAR_PAGEPAINTER_H_ -#include -#include -#include +#include +#include +#include #include "core/area.h" // for NormalizedPoint diff --git a/ui/pageviewannotator.cpp b/ui/pageviewannotator.cpp index 83bf0fb04..6dbe5b510 100644 --- a/ui/pageviewannotator.cpp +++ b/ui/pageviewannotator.cpp @@ -10,7 +10,7 @@ #include "pageviewannotator.h" // qt / kde includes -#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include -#include +#include #include // system includes diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp index d54dc4600..9d81f4e45 100644 --- a/ui/presentationwidget.cpp +++ b/ui/presentationwidget.cpp @@ -10,7 +10,7 @@ #include "presentationwidget.h" // qt/kde includes -#include +#include #include #include #include diff --git a/ui/side_reviews.cpp b/ui/side_reviews.cpp index 9d31c6809..25e358816 100644 --- a/ui/side_reviews.cpp +++ b/ui/side_reviews.cpp @@ -10,15 +10,15 @@ #include "side_reviews.h" // qt/kde includes -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/ui/side_reviews.h b/ui/side_reviews.h index ed281a969..79c99df1d 100644 --- a/ui/side_reviews.h +++ b/ui/side_reviews.h @@ -10,9 +10,9 @@ #ifndef _OKULAR_SIDE_REVIEWS_H_ #define _OKULAR_SIDE_REVIEWS_H_ -#include -#include -#include +#include +#include +#include #include "core/observer.h" diff --git a/ui/snapshottaker.cpp b/ui/snapshottaker.cpp index 6eabf95c7..693d1e184 100644 --- a/ui/snapshottaker.cpp +++ b/ui/snapshottaker.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include SnapshotTaker::SnapshotTaker(const QUrl &url, QObject *parent ) : QObject( parent )