Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Runtime
Commits
91d4497d
Commit
91d4497d
authored
Nov 01, 2008
by
Volker Krause
Browse files
Follow kdepimlibs changes.
svn path=/trunk/KDE/kdepim/akonadi/; revision=878850
parent
cdbf6423
Changes
2
Hide whitespace changes
Inline
Side-by-side
resources/shared/singlefileresource.h
View file @
91d4497d
...
...
@@ -23,7 +23,7 @@
#include
"singlefileresourcebase.h"
#include
<akonadi/
collection
displayattribute.h>
#include
<akonadi/
entity
displayattribute.h>
#include
<kio/job.h>
#include
<KDirWatch>
...
...
@@ -78,7 +78,7 @@ class SingleFileResource : public SingleFileResourceBase
{
if
(
!
nameWasChanged
)
setName
(
mCurrentUrl
.
fileName
()
);
// check if the file does not exist yet, if so, create it
if
(
!
QFile
::
exists
(
mCurrentUrl
.
path
()
)
)
{
QFile
f
(
mCurrentUrl
.
path
()
);
...
...
@@ -98,7 +98,7 @@ class SingleFileResource : public SingleFileResourceBase
if
(
Settings
::
self
()
->
monitorFile
()
)
KDirWatch
::
self
()
->
addFile
(
mCurrentUrl
.
path
()
);
emit
status
(
Idle
,
i18nc
(
"@info:status"
,
"Ready"
)
);
}
else
...
...
@@ -116,7 +116,7 @@ class SingleFileResource : public SingleFileResourceBase
}
KGlobal
::
ref
();
// NOTE: Test what happens with remotefile -> save, close before save is finished.
mDownloadJob
=
KIO
::
file_copy
(
mCurrentUrl
,
KUrl
(
cacheFile
()
),
-
1
,
KIO
::
Overwrite
|
KIO
::
DefaultFlags
|
KIO
::
HideProgressInfo
);
connect
(
mDownloadJob
,
SIGNAL
(
result
(
KJob
*
)
),
...
...
@@ -202,7 +202,7 @@ class SingleFileResource : public SingleFileResourceBase
rights
|=
Collection
::
CanChangeCollection
;
c
.
setRights
(
rights
);
}
Collection
DisplayAttribute
*
attr
=
c
.
attribute
<
Collection
DisplayAttribute
>
(
Collection
::
AddIfMissing
);
Entity
DisplayAttribute
*
attr
=
c
.
attribute
<
Entity
DisplayAttribute
>
(
Collection
::
AddIfMissing
);
attr
->
setDisplayName
(
name
()
);
attr
->
setIconName
(
mCollectionIcon
);
Collection
::
List
list
;
...
...
resources/shared/singlefileresourcebase.cpp
View file @
91d4497d
...
...
@@ -21,7 +21,7 @@
#include
"singlefileresourcebase.h"
#include
<akonadi/changerecorder.h>
#include
<akonadi/
collection
displayattribute.h>
#include
<akonadi/
entity
displayattribute.h>
#include
<akonadi/itemfetchscope.h>
#include
<kio/job.h>
...
...
@@ -64,8 +64,8 @@ void SingleFileResourceBase::setSupportedMimetypes(const QStringList & mimeTypes
void
SingleFileResourceBase
::
collectionChanged
(
const
Akonadi
::
Collection
&
collection
)
{
QString
newName
=
collection
.
name
();
if
(
collection
.
hasAttribute
<
Collection
DisplayAttribute
>
()
)
{
Collection
DisplayAttribute
*
attr
=
collection
.
attribute
<
Collection
DisplayAttribute
>
();
if
(
collection
.
hasAttribute
<
Entity
DisplayAttribute
>
()
)
{
Entity
DisplayAttribute
*
attr
=
collection
.
attribute
<
Entity
DisplayAttribute
>
();
if
(
!
attr
->
displayName
().
isEmpty
()
)
newName
=
attr
->
displayName
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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