Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Okular
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joao Oliveira
Okular
Commits
9ff5451f
Commit
9ff5451f
authored
Oct 01, 2014
by
Sergio Martins
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'KDE/4.14' into master
parents
188476de
cb4d52fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
shell/okular_main.cpp
shell/okular_main.cpp
+9
-0
shell/shell.cpp
shell/shell.cpp
+8
-0
shell/shell.h
shell/shell.h
+7
-0
No files found.
shell/okular_main.cpp
View file @
9ff5451f
...
...
@@ -156,6 +156,11 @@ Status main(const QStringList &paths, const QString &serializedOptions)
}
Shell
*
shell
=
new
Shell
(
serializedOptions
);
if
(
!
shell
->
isValid
()
)
{
return
Error
;
}
shell
->
show
();
for
(
int
i
=
0
;
i
<
paths
.
count
();
)
{
...
...
@@ -168,6 +173,10 @@ Status main(const QStringList &paths, const QString &serializedOptions)
else
{
shell
=
new
Shell
(
serializedOptions
);
if
(
!
shell
->
isValid
()
)
{
return
Error
;
}
shell
->
show
();
}
}
...
...
shell/shell.cpp
View file @
9ff5451f
...
...
@@ -64,6 +64,7 @@ Shell::Shell( const QString &serializedOptions )
#ifdef KActivities_FOUND
,
m_activityResource
(
0
)
#endif
,
m_isValid
(
true
)
{
setObjectName
(
QLatin1String
(
"okular::Shell"
)
);
setContextMenuPolicy
(
Qt
::
NoContextMenu
);
...
...
@@ -79,6 +80,7 @@ Shell::Shell( const QString &serializedOptions )
{
// if we couldn't find our Part, we exit since the Shell by
// itself can't do anything useful
m_isValid
=
false
;
KMessageBox
::
error
(
this
,
i18n
(
"Unable to find the Okular component."
));
return
;
}
...
...
@@ -130,10 +132,16 @@ Shell::Shell( const QString &serializedOptions )
}
else
{
m_isValid
=
false
;
KMessageBox
::
error
(
this
,
i18n
(
"Unable to find the Okular component."
));
}
}
bool
Shell
::
isValid
()
const
{
return
m_isValid
;
}
void
Shell
::
showOpenRecentMenu
()
{
m_recent
->
menu
()
->
popup
(
QCursor
::
pos
());
...
...
shell/shell.h
View file @
9ff5451f
...
...
@@ -60,6 +60,12 @@ public:
virtual
~
Shell
();
QSize
sizeHint
()
const
;
/**
* Returns false if Okular component wasn't found
**/
bool
isValid
()
const
;
public
slots
:
void
slotQuit
();
...
...
@@ -156,6 +162,7 @@ private:
#ifdef KActivities_FOUND
KActivities
::
ResourceInstance
*
m_activityResource
;
#endif
bool
m_isValid
;
};
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment