Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Chakra
Akabei
Akabei frontend
Commits
260f16bd
Commit
260f16bd
authored
Mar 04, 2014
by
Lukas Appelhans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show it when a package is upgradeable
parent
2e273e81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
syncoperation.cpp
syncoperation.cpp
+6
-2
No files found.
syncoperation.cpp
View file @
260f16bd
...
...
@@ -243,15 +243,19 @@ void SyncOperation::searchResult(QUuid , QList< Akabei::Package* > packages)
continue
;
alreadyDisplayed
<<
p
->
name
();
//Search if package is already installed, if so, what version is installed
Akabei
::
Package
::
List
result
=
Akabei
::
Backend
::
instance
()
->
localDatabase
()
->
searchPackages
(
p
->
name
(),
Akabei
::
SearchNameEqual
);
out
<<
qSetFieldWidth
(
0
);
out
<<
"*~ "
<<
db
->
name
()
<<
'/'
<<
p
->
name
();
if
(
p
->
isInstalled
())
if
(
!
result
.
isEmpty
()
&&
result
.
first
()
->
version
()
==
p
->
version
())
out
<<
' '
<<
QObject
::
tr
(
"[Installed]"
);
else
if
(
!
result
.
isEmpty
())
out
<<
' '
<<
QObject
::
tr
(
"[Upgradeable]"
);
out
<<
endl
;
if
(
!
m_options
.
contains
(
APM
::
ShowLess
))
{
Akabei
::
Package
::
List
result
=
Akabei
::
Backend
::
instance
()
->
localDatabase
()
->
searchPackages
(
p
->
name
(),
Akabei
::
SearchNameEqual
);
out
<<
"
\t
"
<<
qSetFieldWidth
(
n
)
<<
fields
[
"Available version:"
]
<<
qSetFieldWidth
(
0
)
<<
p
->
version
().
toByteArray
().
constData
()
<<
endl
;
if
(
!
result
.
isEmpty
()
&&
(
!
smallDetails
||
result
.
first
()
->
version
()
>
p
->
version
()))
{
out
<<
"
\t
"
<<
qSetFieldWidth
(
n
)
<<
fields
[
"Installed version:"
]
<<
qSetFieldWidth
(
0
)
<<
result
.
first
()
->
version
().
toByteArray
().
constData
()
<<
endl
;
...
...
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