KDE CI: Applications okular kf5-qt5 FedoraQt5.8 - Build # 95 - Still Unstable!

2017-11-03 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Applications%20okular%20kf5-qt5%20FedoraQt5.8/95/
 Project:
Applications okular kf5-qt5 FedoraQt5.8
 Date of build:
Fri, 03 Nov 2017 23:26:14 +
 Build duration:
10 min and counting
   JUnit Tests
  Name: (root) Failed: 1 test(s), Passed: 15 test(s), Skipped: 0 test(s), Total: 16 test(s)Failed: TestSuite.mainshelltest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report88%
(21/24)46%
(124/268)46%
(124/268)29%
(10913/38014)19%
(4971/26262)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionals80%
(4/5)80%
(4/5)48%
(808/1679)29%
(371/1267)autotests93%
(13/14)93%
(13/14)83%
(1631/1976)39%
(957/2477)conf6%
(1/17)6%
(1/17)7%
(53/805)0%
(1/272)conf.autotests100%
(1/1)100%
(1/1)100%
(17/17)50%
(7/14)core83%
(40/48)83%
(40/48)46%
(4181/9134)34%
(2023/6017)core.script0%
(0/9)0%
(0/9)0%
(0/494)0%
(0/230)generators.comicbook29%
(2/7)29%
(2/7)3%
(10/397)0%
(0/430)generators.dvi2%
(1/46)2%
(1/46)0%
(9/3571)0%
(1/2423)generators.fax17%
(1/6)17%
(1/6)2%
(7/432)0%
(0/585)generators.fictionbook60%
(3/5)60%
(3/5)3%
(16/531)0%
(2/454)generators.kimgio100%
(1/1)100%
(1/1)63%
(41/65)31%
(5/16)generators.kimgio.tests100%
(1/1)100%
(1/1)100%
(49/49)46%
(24/52)generators.mobipocket60%
(3/5)60%
(3/5)11%
(13/115)0%
(0/120)generators.ooo27%
(3/11)27%
(3/11)1%
(14/1125)0%
(0/736)generators.plucker100%
(1/1)100%
(1/1)4%
(4/98)0%
(0/36)generators.plucker.unpluck0%
(0/6)0%
(0/6)0%
(0/1652)0%
(0/876)generators.poppler60%
(3/5)60%
(3/5)44%
(575/1311)35%
(247/697)generators.tiff100%
(1/1)100%
(1/1)4%
(10/226)0%
  

[okular] [Bug 386176] okular: CMake Error in generators/spectre/CMakeLists.txt

2017-11-03 Thread Henrik Fehlauer
https://bugs.kde.org/show_bug.cgi?id=386176

Henrik Fehlauer  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/oku
   ||lar/f777e2a9241c4f384f60c46
   ||7e226eee85fb5bc98
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Henrik Fehlauer  ---
Git commit f777e2a9241c4f384f60c467e226eee85fb5bc98 by Henrik Fehlauer.
Committed on 03/11/2017 at 23:25.
Pushed by rkflx into branch 'master'.

Fix CMake Error in generators/spectre/CMakeLists.txt

Summary:
When porting from `add_library` to `okular_add_generator`, 2f9246ae42ce
missed to remove `MODULE` for spectre, which is already implicitly added
as can be seen
[here](https://phabricator.kde.org/source/kcoreaddons/browse/master/KF5CoreAddonsMacros.cmake;83623a46c9862ee37535de93427dec0b0c55e24d$139).

This causes the upcoming CMake 3.10 to print the error `Cannot find
source file`, which can be fixed by removing the superfluous `MODULE`.

Test Plan:
No error shown anymore with CMake 3.10.0-rc4. Still works with CMake
3.5.1.

Reviewers: #okular, ngraham

Reviewed By: ngraham

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8612

M  +1-1generators/spectre/CMakeLists.txt

https://commits.kde.org/okular/f777e2a9241c4f384f60c467e226eee85fb5bc98

-- 
You are receiving this mail because:
You are the assignee for the bug.

D8612: Fix CMake Error in generators/spectre/CMakeLists.txt

2017-11-03 Thread Henrik Fehlauer
This revision was automatically updated to reflect the committed changes.
Closed by commit R223:f777e2a9241c: Fix CMake Error in 
generators/spectre/CMakeLists.txt (authored by rkflx).

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8612?vs=21744&id=21854

REVISION DETAIL
  https://phabricator.kde.org/D8612

AFFECTED FILES
  generators/spectre/CMakeLists.txt

To: rkflx, #okular, ngraham
Cc: aacid


D8642: Rework saving of annotations and form data

2017-11-03 Thread Laurent Montel
mlaurent requested changes to this revision.
mlaurent added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> documenttest.cpp:112
> +QCOMPARE( m_document->isDocdataMigrationNeeded(), false );
> +m_document->closeDocument();
> +}

closeDocument delete m_document with a deleteLater or we need to delete it 
before finish method ?

> parttest.cpp:785
> +QTemporaryFile nativeFromArchiveFile( QString( "%1/okrXX.%2" ).arg( 
> QDir::tempPath() ).arg ( extension ) );
> +QVERIFY( archiveSave.open() ); archiveSave.close();
> +QVERIFY( nativeDirectSave.open() ); nativeDirectSave.close();

new line before archiveSave.close() more readable

> document.cpp:4388
> +{
> +qWarning() << "Unhandled undo command" << uc;
> +}

qCWarning(...)

> document.cpp:
> +
> +bool Document::swapBackingFileArchive( const QString &newFileName, const 
> QUrl & url )
> +{

Remove space before url

> document.cpp:4494
> +{
> +qWarning() << "Unhandled undo command" << uc;
> +}

qCWarnign(...)

> document.cpp:4729
> +
> +Document::OpenResult Document::openDocumentArchive( const QString & docFile, 
> const QUrl & url, const QString & password )
> +{

coding style : remove space after &

> document.h:744
> + *
> + * @since 0.20 (KDE 4.14)
> + */

4.14?

> document.h:758
> + *
> + * @since 0.20 (KDE 4.14)
> + */

4.14?

> document.h:771
> + *
> + * @since 0.20 (KDE 4.14)
> + */

same

> document.h:773
> + */
> +bool swapBackingFileArchive( const QString &newFileName, const QUrl 
> & url );
> +

coding style: Remove space before url

> document.h:865
> + *
> + * @since 0.14 (KDE 4.20)
> + */

kde 4.20 ?

> documentcommands.cpp:714
> +{
> +FormFieldButton *button = dynamic_cast *>(Okular::PagePrivate::findEquivalentForm( newPagesVector[m_pageNumber], 
> oldFormButton ));
> +m_formButtons << button;

if button is null do you think that we need to add to QList ?

> part.cpp:566
>  m_dirtyHandler->setSingleShot( true );
> -connect( m_dirtyHandler, &QTimer::timeout,this, &Part::slotDoFileDirty );
> +connect( m_dirtyHandler, SIGNAL(timeout()),this, 
> SLOT(slotAttemptReload()) );
>  

You can still use
connect(m_dirtyHandler, &QTimer::timeout, this, [this]() {slotAttemptReload();})

> part.cpp:817
>  
> -m_saveCopyAs = KStandardAction::saveAs( this, SLOT(slotSaveCopyAs()), ac 
> );
> -m_saveCopyAs->setText( i18n( "Save &Copy As..." ) );
> -ac->addAction( QStringLiteral("file_save_copy"), m_saveCopyAs );
> -ac->setDefaultShortcuts(m_saveCopyAs, 
> KStandardShortcut::shortcut(KStandardShortcut::SaveAs));
> -m_saveCopyAs->setEnabled( false );
> +m_save = KStandardAction::save( this, SLOT(saveFile()), ac );
> +m_save->setEnabled( false );

You can use new connect api too

> part.cpp:2476
> +QScopedPointer tempFile;
> +KIO::Job *copyJob; // this will be filled with the job that writes to 
> saveUrl
>  

*copyJob = nullptr; to be sure that it's initialized

> annotationmodel.cpp:113
> +if ( !item->annotation )
> +qWarning() << "Lost annotation on document save, something went 
> wrong";
> +}

qCWarning(...)

> formwidgets.cpp:89
> +{
> +qWarning() << "fwButton is not a QAbstractButton" << fwButton;
> +return;

qCWarning(...)

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8642

To: aacid, mlaurent
Cc: mlaurent, michaelweghorn, ngraham, #okular, aacid


[okular] [Bug 357526] Annotation can not be saved automatically for a specific PDF file.

2017-11-03 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=357526

Albert Astals Cid  changed:

   What|Removed |Added

 CC||aa...@kde.org

--- Comment #6 from Albert Astals Cid  ---
FWIW we're disabling automatic annotation saving soon, see 
https://phabricator.kde.org/D8642

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 317346] Okular overwrites PDF form data without asking

2017-11-03 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=317346

--- Comment #6 from Albert Astals Cid  ---
For people that have an idea how to compile and test stuff, please test
https://phabricator.kde.org/D8642

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 267350] filling out a PDF form saves data to some file i ~/.kde/share/apps/okular/docdata/

2017-11-03 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=267350

--- Comment #58 from Albert Astals Cid  ---
For people that have an idea how to compile and test stuff, please test
https://phabricator.kde.org/D8642

-- 
You are receiving this mail because:
You are the assignee for the bug.

D8642: Rework saving of annotations and form data

2017-11-03 Thread Albert Astals Cid
aacid added a comment.


  Note KDE Applications 17.12 is Nov 16, it would be great if we could get this 
in, so please try to review ASAP :)

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8642

To: aacid
Cc: #okular, aacid


D8642: Rework saving of annotations and form data

2017-11-03 Thread Albert Astals Cid
aacid created this revision.
aacid added a project: Okular.
Restricted Application added a subscriber: Okular.

REVISION SUMMARY
  Changes are no longer saved as part of the local configuration files, they 
can be either saved back to file, to an .okular file (if the file format 
doesn't support annotations) or not saved at all.
  
  You are probably better having a look at each of the changes individually of
  git log  origin/master...origin/dont-use-docdata-for-annots-and-forms

TEST PLAN
  
  
  - Open pdf file, add anotation, close app
- You get dialog about losing changes, check that save, discard, cancel all 
do what they say
  
  - Open png file, add anotation, close app
- You get dialog about losing changes, check that save, discard, cancel all 
do what they say
  - Check for saving suggests saving as okular archive to not lose the 
annotation
- Check that opening the saved .okular file indeed keeps the annotation
  
  - With old version of okular, add annotation to pdf file, then open with new 
version, see you get the top bar about having to migrate the contents, save it 
as a different file, then open again the original file with old version of 
okular and verify the "annotation that was saved in docdata" is gone, open the 
second file and confirm the annotation is there.
  
  - Open pdf file with forms for example autotests/data/formSamples.pdf and 
modify all fields, also add an annotation and move it, resize it, change its 
color and delete it. Now check that you can undo/redo and save at all of the 
steps of the stack. This is important because saving indeed is like an internal 
reload so the structures of the undo/redo stack need to be updated to the new 
values seamlessly
  
  - Open png file add an annotation and save it as okular archive. Then move 
the annotation, resize it, change its color and delete it. Now check that you 
can undo/redo and save at all of the steps of the stack. This is important 
because saving indeed is like an internal reload so the structures of the 
undo/redo stack need to be updated to the new values seamlessly

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8642

AFFECTED FILES
  autotests/data/file1-docdata.xml
  autotests/documenttest.cpp
  autotests/parttest.cpp
  core/document.cpp
  core/document.h
  core/document_p.h
  core/documentcommands.cpp
  core/documentcommands_p.h
  core/generator.cpp
  core/generator.h
  core/observer.h
  core/page.cpp
  core/page.h
  core/page_p.h
  doc/index.docbook
  generators/kimgio/generator_kimgio.cpp
  generators/kimgio/generator_kimgio.h
  generators/poppler/generator_pdf.cpp
  generators/poppler/generator_pdf.h
  part.cpp
  part.h
  part.rc
  shell/shell.cpp
  shell/shell.h
  ui/annotationmodel.cpp
  ui/annotwindow.cpp
  ui/annotwindow.h
  ui/bookmarklist.cpp
  ui/formwidgets.cpp
  ui/formwidgets.h
  ui/pageview.cpp
  ui/pageview.h
  ui/pageviewmouseannotation.cpp
  ui/pageviewmouseannotation.h
  ui/pageviewutils.cpp
  ui/pageviewutils.h

To: aacid
Cc: #okular, aacid


KDE CI: Applications okular kf5-qt5 FedoraQt5.8 - Build # 94 - Still Unstable!

2017-11-03 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Applications%20okular%20kf5-qt5%20FedoraQt5.8/94/
 Project:
Applications okular kf5-qt5 FedoraQt5.8
 Date of build:
Fri, 03 Nov 2017 14:31:07 +
 Build duration:
10 min and counting
   JUnit Tests
  Name: (root) Failed: 1 test(s), Passed: 15 test(s), Skipped: 0 test(s), Total: 16 test(s)Failed: TestSuite.mainshelltest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report88%
(21/24)46%
(124/268)46%
(124/268)29%
(10898/38014)19%
(4959/26262)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionals80%
(4/5)80%
(4/5)48%
(808/1679)29%
(371/1267)autotests93%
(13/14)93%
(13/14)83%
(1631/1976)39%
(957/2477)conf6%
(1/17)6%
(1/17)7%
(53/805)0%
(1/272)conf.autotests100%
(1/1)100%
(1/1)100%
(17/17)50%
(7/14)core83%
(40/48)83%
(40/48)46%
(4179/9134)34%
(2019/6017)core.script0%
(0/9)0%
(0/9)0%
(0/494)0%
(0/230)generators.comicbook29%
(2/7)29%
(2/7)3%
(10/397)0%
(0/430)generators.dvi2%
(1/46)2%
(1/46)0%
(9/3571)0%
(1/2423)generators.fax17%
(1/6)17%
(1/6)2%
(7/432)0%
(0/585)generators.fictionbook60%
(3/5)60%
(3/5)3%
(16/531)0%
(2/454)generators.kimgio100%
(1/1)100%
(1/1)63%
(41/65)31%
(5/16)generators.kimgio.tests100%
(1/1)100%
(1/1)100%
(49/49)46%
(24/52)generators.mobipocket60%
(3/5)60%
(3/5)11%
(13/115)0%
(0/120)generators.ooo27%
(3/11)27%
(3/11)1%
(14/1125)0%
(0/736)generators.plucker100%
(1/1)100%
(1/1)4%
(4/98)0%
(0/36)generators.plucker.unpluck0%
(0/6)0%
(0/6)0%
(0/1652)0%
(0/876)generators.poppler60%
(3/5)60%
(3/5)44%
(575/1311)35%
(247/697)generators.tiff100%
(1/1)100%
(1/1)4%
(10/226)0%
  

KDE CI: Applications okular kf5-qt5 FedoraQt5.8 - Build # 93 - Still Unstable!

2017-11-03 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Applications%20okular%20kf5-qt5%20FedoraQt5.8/93/
 Project:
Applications okular kf5-qt5 FedoraQt5.8
 Date of build:
Fri, 03 Nov 2017 14:20:27 +
 Build duration:
10 min and counting
   JUnit Tests
  Name: (root) Failed: 1 test(s), Passed: 15 test(s), Skipped: 0 test(s), Total: 16 test(s)Failed: TestSuite.mainshelltest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report88%
(21/24)46%
(124/268)46%
(124/268)29%
(10900/38014)19%
(4961/26262)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionals80%
(4/5)80%
(4/5)48%
(808/1679)29%
(371/1267)autotests93%
(13/14)93%
(13/14)83%
(1631/1976)39%
(955/2477)conf6%
(1/17)6%
(1/17)7%
(53/805)0%
(1/272)conf.autotests100%
(1/1)100%
(1/1)100%
(17/17)50%
(7/14)core83%
(40/48)83%
(40/48)46%
(4181/9134)34%
(2023/6017)core.script0%
(0/9)0%
(0/9)0%
(0/494)0%
(0/230)generators.comicbook29%
(2/7)29%
(2/7)3%
(10/397)0%
(0/430)generators.dvi2%
(1/46)2%
(1/46)0%
(9/3571)0%
(1/2423)generators.fax17%
(1/6)17%
(1/6)2%
(7/432)0%
(0/585)generators.fictionbook60%
(3/5)60%
(3/5)3%
(16/531)0%
(2/454)generators.kimgio100%
(1/1)100%
(1/1)63%
(41/65)31%
(5/16)generators.kimgio.tests100%
(1/1)100%
(1/1)100%
(49/49)46%
(24/52)generators.mobipocket60%
(3/5)60%
(3/5)11%
(13/115)0%
(0/120)generators.ooo27%
(3/11)27%
(3/11)1%
(14/1125)0%
(0/736)generators.plucker100%
(1/1)100%
(1/1)4%
(4/98)0%
(0/36)generators.plucker.unpluck0%
(0/6)0%
(0/6)0%
(0/1652)0%
(0/876)generators.poppler60%
(3/5)60%
(3/5)44%
(575/1311)35%
(247/697)generators.tiff100%
(1/1)100%
(1/1)4%
(10/226)0%
  

D8379: PDF: Support the new poppler renderToImage with update callback

2017-11-03 Thread Albert Astals Cid
aacid updated this revision to Diff 21826.
aacid added a comment.


  rebase

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8379?vs=21790&id=21826

BRANCH
  updateCallback (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D8379

AFFECTED FILES
  core/document.cpp
  core/generator.cpp
  core/generator.h
  core/generator_p.h
  core/page.cpp
  generators/poppler/CMakeLists.txt
  generators/poppler/config-okular-poppler.h.cmake
  generators/poppler/generator_pdf.cpp

To: aacid, #okular, mlaurent, mwolff
Cc: mwolff, rkflx, ngraham, michaelweghorn, mlaurent, #okular, aacid