mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
gwenview: adjust document editor test case
same document editor is used for raster and svg images now so there is editor (of sorts, saving svg images is not possible but applying transformation and saving in different format is) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1ff037cb73
commit
dfd25bc1f0
1 changed files with 6 additions and 5 deletions
|
@ -695,7 +695,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual void doStart()
|
||||
void doStart() final
|
||||
{
|
||||
document()->waitUntilLoaded();
|
||||
*mHasEditor = checkDocumentEditor() ? 1 : 0;
|
||||
|
@ -716,7 +716,7 @@ public:
|
|||
*mShowErrorMessageCalled = false;
|
||||
}
|
||||
|
||||
virtual void showErrorMessage()
|
||||
void showErrorMessage() final
|
||||
{
|
||||
kDebug();
|
||||
*mShowErrorMessageCalled = true;
|
||||
|
@ -733,12 +733,12 @@ private:
|
|||
void DocumentTest::testCheckDocumentEditor()
|
||||
{
|
||||
int hasEditor;
|
||||
bool showErrorMessageCalled;
|
||||
bool showErrorMessageCalled = false;
|
||||
QEventLoop loop;
|
||||
Document::Ptr doc;
|
||||
TestCheckDocumentEditorJob* job;
|
||||
|
||||
doc = DocumentFactory::instance()->load(urlForTestFile("orient6.jpg"));
|
||||
doc = DocumentFactory::instance()->load(urlForTestFile("test.png"));
|
||||
|
||||
job = new TestCheckDocumentEditorJob(&hasEditor);
|
||||
job->setUiDelegate(new TestUiDelegate(&showErrorMessageCalled));
|
||||
|
@ -748,8 +748,9 @@ void DocumentTest::testCheckDocumentEditor()
|
|||
QVERIFY(!showErrorMessageCalled);
|
||||
QCOMPARE(hasEditor, 1);
|
||||
|
||||
doc = DocumentFactory::instance()->load(urlForTestFile("test.svg"));
|
||||
doc = DocumentFactory::instance()->load(urlForTestFile("doesnotexist.svg"));
|
||||
|
||||
showErrorMessageCalled = false;
|
||||
job = new TestCheckDocumentEditorJob(&hasEditor);
|
||||
job->setUiDelegate(new TestUiDelegate(&showErrorMessageCalled));
|
||||
doc->enqueueJob(job);
|
||||
|
|
Loading…
Add table
Reference in a new issue