Commit graph

56 commits

Author SHA1 Message Date
Albert Astals Cid 19b7e3c112 The work in this branch was sponsored by LiMux
give them some credit in the headers
2017-11-16 09:58:31 +01:00
Albert Astals Cid f63aa211dc test: Actually do the migration instead of faking it 2017-11-15 12:09:17 +01:00
Albert Astals Cid 3e423eeb7c Add missing test file 2017-11-13 10:16:25 +01:00
Albert Astals Cid ae4f0671bf Unsplit some lines in tests 2017-11-06 06:05:22 +01:00
Albert Astals Cid fcbe97bdc0 Fix leaks in documenttest 2017-11-06 05:57:20 +01:00
Albert Astals Cid cd24ad31c8 Implement missing todo in Document::swapBackingFileArchive
And extend tests to include archive files
2017-10-30 17:01:46 +01:00
Albert Astals Cid 946d54fb3e Add saveas+undo/redo for forms 2017-10-30 16:03:40 +01:00
Albert Astals Cid c14fbe5eb6 Remove SaveAsDontShowWarning
It was only used in tests as a way to "hide" warning dialogs, now we have a proper way to
close them, this way we make sure that dialogs are should when they should not not when they should not
2017-10-30 11:12:00 +01:00
Albert Astals Cid 835c9c495d Add test for saveAs + undo/redo stack
Proves that if the backend supports swapping the file we keep the undo/stack around correctly
2017-10-27 10:12:29 +02:00
Albert Astals Cid c86c9a04a2 Add a jpg to the saveAs tests
This way we're also testing a backend that supports swapBackingFile but doesn't natively support annotations
2017-10-27 09:35:11 +02:00
Albert Astals Cid 8d7ea894f3 make parttest pass again 2017-10-26 21:24:09 +02:00
Albert Astals Cid 54bcb44559 Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-10-23 16:03:18 +02:00
Albert Astals Cid a78d2da440 QTest::addRow -> QTest::newRow
addRow is only in since Qt 5.9 and we don't need it
2017-10-15 23:42:45 +02:00
Renato Araujo Oliveira Filho 6d7403ff13 Interact with hyperlinks in TextSelect mode
Allow user to click on url while on any selection mode

Based on https://git.reviewboard.kde.org/r/124961/ by Jake Linder <JakeLinder@mail.com>

Includes several autotests to try to minimize possible regressions as much as possible

BUGS: 318078
REVIEW: 130246
2017-10-11 15:03:36 +02:00
Albert Astals Cid a93661e892 Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-27 15:01:57 +02:00
Albert Astals Cid 95a32d7730 Show dialog to ask when closing when more than tab open
Summary:
The checkbox is checked and says "Warn me on closing more than one tab",
for that reason we can't use the default KMessageBox::questionYesNo since
there the checkbox is always not checked and it's when checked that you enable it

Inspired by code from torham zed torhamzed@yahoo.com at review request 126406

Reviewers: #okular, #kde_applications

Subscribers: alexeymin, ngraham, colomar, rkflx, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D7714
2017-09-17 23:50:27 +02:00
Henrik Fehlauer bd20e48c3c Update to synctex 1.19
Summary:
This should prevent crashes when reloading some synctex-enabled pdf
files created with newer versions of TeXLive. We also gain bugfixes,
features and improved accuracy from the last 6 years of synctex
development.

Procedure followed:
- svn co svn://tug.org/texlive/trunk/Build/source/texk/web2c/synctexdir
- Check out revision 45150
- Update files present in core/synctex/*
- Adapt Okular code to changes
- Review and drop or update/apply old patches using quilt
- Create missing patches for local synctex changes
- New patch: Omit warning message when opening non-synctex pdf
- Two new patches to fix more compiler warnings
- New patch: Plug multiple leaks and prevent a segfault

TODO for later:
- Move sync file detection code to Okular to never call into synctex C code for non-synctex files
- Evaluate feasibility of upstreaming all patches for TeXLive 2018 and using synctex as a library

BUG: 383915
FIXED-IN: 17.12.0

Test Plan:
- No crash in synctex on reloading empty.pdf from bugreport anymore.
- Shift-clicking on a word in a simple pdf opens Kate with the corresponding tex line.
- Forward and backward search in Kile seems to work.
- Works with synctex files from both TeXLive 2015 and 2017.
- PartTest::testForwardPDF still passes.
- No additional memory leaks in autotests and with basic synctex and non-synctex usage of Okular.

Reviewers: #okular, sander, #kile, aacid

Reviewed By: #okular, aacid

Subscribers: mludwig, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D7594
2017-09-12 21:56:49 +02:00
Albert Astals Cid 729a622a49 This test file was lost at some point
Or was never added
2017-09-11 19:52:04 +02:00
Albert Astals Cid 04ed10d3ea Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-11 19:51:51 +02:00
Kevin Funk a53a2402ca clang-tidy: modernize-use-nullptr run
Semi-ACK'd by Albert :)
2017-09-06 00:19:48 +02:00
Oliver Sander 3859fba07d Remove dependency on KActivities on Windows.
REVIEW: 130022
REVIEW: 126378
2017-03-18 01:58:47 +01:00
Albert Astals Cid b13fc1d3be Readd test for file existance when opening files with # on the path
BUGS: 373855
2017-01-16 00:33:25 +01:00
Albert Astals Cid 964e3eb2e5 Test: Be really patient
just to make sure it's not the machine being slow and it's the test that actually is failing
2016-12-09 00:35:52 +01:00
Albert Astals Cid 2aa006fa87 Test pixel pushing 2016-10-30 23:55:32 +01:00
Albert Astals Cid 5db87d4d6f Fix autotest
Make the click/select location depend on the content size, not on the window size
2016-10-30 23:19:14 +01:00
Albert Vaca 3c93b2523e Added missing overrides found by clang-tidy 2016-10-29 17:07:10 +02:00
Albert Astals Cid 62eea3336b Merge remote-tracking branch 'origin/master' into frameworks 2016-10-29 11:13:24 +02:00
Gleb Popov bfa28f1f64 Fix build with Visual Studio 2015.
REVIEW: 128805
2016-08-31 17:34:15 +03:00
Martin T. H. Sandsmark cbe859eeec Port away from obsolete QTest functions 2016-08-13 22:37:30 +02:00
Martin T. H. Sandsmark ba1aeef06f Remove dead and unused code after porting to Qt5 QUrl 2016-07-24 19:14:29 +02:00
Martin T. H. Sandsmark 2e2432308f Clean up Part autotest, proper porting etc. 2016-07-24 17:38:09 +02:00
Martin T. H. Sandsmark b9b2c3bfae Remove usage of KGlobal from Part autotest 2016-07-24 17:10:45 +02:00
Martin T. H. Sandsmark 4189304934 Port away from KStandardPaths 2016-07-11 23:25:09 +02:00
Martin T. H. Sandsmark 3fcd698896 autotests: Fix build without implicit cast to/from ascii
See previous commits for details.
2016-07-11 22:01:10 +02:00
Martin T. H. Sandsmark 439ced872d Port away from signal/slot keyword
When building okular without kdelibs4support it apparently builds with
-DQT_NO_SIGNALS_SLOTS_KEYWORDS.
2016-07-11 19:34:08 +02:00
Aleix Pol 32b62e919a Remove most KDELibs4Support linking
Ports away from KFileDialog.
Stops linking to KDELibs4Support from objects that don't need it.

REVIEW: 127021
2016-05-31 00:13:36 +02:00
Alex Richardson 1b2de0d1d0 Fix mainshelltest (and as a side-effect docdata saving)
Try fixing mainshelltest: one more passes now

QUrl is not automatically exposed to DBus so the DBus call would fail.
Changed the parameter to QString instead so that DBus invocation works.

mainshelltest: set QStandardPaths to test mode

Parse command line flags with a single dash as a long option

Unlike KCmdLineArgs QCommandLineParser treats options starting with a
single minus as multiple short options by default.

Previously okular -unique would fail with the following error:
Unknown options: u, n, i, q, u, e.

Also changed mainshelltest to use two dashes in case this behaviour
should change in the future.

mainshelltest failures have been reduced from 15 to 4 by this commit.

Fix docdata saving and added a warning message if it fails

If the ~/.local/okular/docdata directory didn't exist previously
creating the docdata file would fail as there are missing paths.

It seems that KStandardDirs used to create the okular/docdata directory
automatically, with QStandardPaths we have to create it manually.

mainshelltest is down to one failed test now

Fix final test case in mainshelltest

as we call QProcess::terminate the exit code will not be 0

REVIEW: 126192
2016-01-30 17:31:57 +01:00
Alex Richardson 449d727707 Fix parttest by increasing the wait duration 2016-01-24 14:11:46 +00:00
Alex Richardson de6443d106 Fix PartTest::testSelectText()
With Qt5 we need a qWait before the mouseRelease otherwise the selection
will not be made
2015-11-28 16:04:57 +00:00
Alex Richardson 19c2c170bb Make parttest pass by adding the file that it wants to open
It seems it was lost when merging master into frameworks.
2015-11-28 16:04:57 +00:00
Alex Richardson 5c566b3543 Fix crash in parttest by failing the test if the file couldn't be opened 2015-11-28 16:04:57 +00:00
Montel Laurent 466eb79615 Use QStringLiteral 2015-10-29 13:37:11 +01:00
Montel Laurent 8805760ccf Merge remote-tracking branch 'origin/master' into frameworks 2015-10-29 13:24:05 +01:00
Albert Astals Cid 8445660539 Merge remote-tracking branch 'origin/master' into frameworks 2015-10-18 22:29:00 +02:00
Alex Richardson ab700b2453 Restore the URL parsing behaviour in from before the KF5 port
This fixes shelltest

REVIEW: 124738
2015-08-28 19:03:59 +02:00
Alex Richardson 461c963cb8 use QTRY_VERIFY/QTRY_COMPARE instead of qWait() loop 2015-08-19 15:14:12 +01:00
Alex Richardson 771fb0de56 Make sure we run the okular executable from the build directory 2015-08-15 19:28:06 +01:00
Alex Richardson 437b2d4a3a Make generatorstest work without installing first 2015-08-15 19:28:06 +01:00
Alex Richardson 8059e5b686 Add a test to see whether generators can be loaded
REVIEW: 123466
2015-05-22 16:33:09 +01:00
Alex Richardson 0ef5903c73 Use ecm_add_test correctly
The first argument is not the target name but one of the source files.
2015-05-22 16:33:09 +01:00