From ec692e459b906fe09d155fb488a9a02f808572eb Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 2 Nov 2018 17:56:37 +0100 Subject: [PATCH] Remove unused variables --- autotests/mainshelltest.cpp | 2 -- core/document.cpp | 3 --- generators/chm/lib/ebook.cpp | 2 -- generators/dvi/generator_dvi.cpp | 2 -- part.cpp | 1 - ui/pageview.cpp | 1 - 6 files changed, 11 deletions(-) diff --git a/autotests/mainshelltest.cpp b/autotests/mainshelltest.cpp index f3ea1d5a9..f9e904626 100644 --- a/autotests/mainshelltest.cpp +++ b/autotests/mainshelltest.cpp @@ -251,7 +251,6 @@ void MainShellTest::testShell() { if (useTabs) { - QSet openUrls; Shell *s = findShell(); QVERIFY(s); Okular::Part *part = dynamic_cast(s->m_tabs[0].part); @@ -474,7 +473,6 @@ void MainShellTest::test2FilesError() Okular::Status status = Okular::main(paths, serializedOptions); QCOMPARE(status, Okular::Error); - QSet openUrls; Shell *s = findShell(); QVERIFY(!s); } diff --git a/core/document.cpp b/core/document.cpp index 602198c04..3332c3a89 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -563,7 +563,6 @@ bool DocumentPrivate::loadDocumentInfo( QFile &infoFile, LoadDocumentInfoFlags l if ( root.tagName() != QLatin1String("documentInfo") ) return false; - QUrl documentUrl( root.attribute( "url" ) ); bool loadedAnything = false; // set if something gets actually loaded // Parse the DOM tree @@ -1580,8 +1579,6 @@ void DocumentPrivate::refreshPixmaps( int pageNumber ) PixmapRequest * p = new PixmapRequest( observer, pageNumber, tilesManager->width() / qApp->devicePixelRatio(), tilesManager->height() / qApp->devicePixelRatio(), 1, PixmapRequest::Asynchronous ); - NormalizedRect tilesRect; - // Get the visible page rect NormalizedRect visibleRect; QVector< Okular::VisiblePageRect * >::const_iterator vIt = m_pageRects.constBegin(), vEnd = m_pageRects.constEnd(); diff --git a/generators/chm/lib/ebook.cpp b/generators/chm/lib/ebook.cpp index f66e32d30..c733bd272 100644 --- a/generators/chm/lib/ebook.cpp +++ b/generators/chm/lib/ebook.cpp @@ -20,8 +20,6 @@ #include "ebook_chm.h" #include "ebook_epub.h" -const char * const INTERNAL_URL_SCHEME = "kchm"; - EBook::EBook() { } diff --git a/generators/dvi/generator_dvi.cpp b/generators/dvi/generator_dvi.cpp index d9fe8341f..6451cdab3 100644 --- a/generators/dvi/generator_dvi.cpp +++ b/generators/dvi/generator_dvi.cpp @@ -286,7 +286,6 @@ Okular::TextPage *DviGenerator::extractTextFromPage( dviPageInfo *pageInfo ) QVector::ConstIterator it = pageInfo->textBoxList.constBegin(); QVector::ConstIterator itEnd = pageInfo->textBoxList.constEnd(); - QRect tmpRect; int pageWidth = pageInfo->width, pageHeight = pageInfo->height; @@ -297,7 +296,6 @@ Okular::TextPage *DviGenerator::extractTextFromPage( dviPageInfo *pageInfo ) #if 0 qCDebug(OkularDviDebug) << "orientation: " << orientation << ", curTB.box: " << curTB.box - << ", tmpRect: " << tmpRect << ", ( " << pageWidth << "," << pageHeight << " )" <height(), fullWidth = 0, fullHeight = 0; - QRect viewportRect( horizontalScrollBar()->value(), verticalScrollBar()->value(), viewportWidth, viewportHeight ); // handle the 'center first page in row' stuff const bool facing = Okular::Settings::viewMode() == Okular::Settings::EnumViewMode::Facing && pageCount > 1;