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
K
KDE Pim
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
Unmaintained
KDE Pim
Commits
ed2d826a
Commit
ed2d826a
authored
Jun 17, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Astyle kdelibs
parent
652aa0a3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
22 deletions
+17
-22
kmail/src/search/checkindexingjob.cpp
kmail/src/search/checkindexingjob.cpp
+1
-1
kmail/src/search/checkindexingmanager.cpp
kmail/src/search/checkindexingmanager.cpp
+1
-2
kmail/src/searchdialog/incompleteindexdialog.cpp
kmail/src/searchdialog/incompleteindexdialog.cpp
+8
-10
kmail/src/searchdialog/incompleteindexdialog.h
kmail/src/searchdialog/incompleteindexdialog.h
+0
-1
kmail/src/searchdialog/searchwindow.cpp
kmail/src/searchdialog/searchwindow.cpp
+7
-8
No files found.
kmail/src/search/checkindexingjob.cpp
View file @
ed2d826a
...
...
@@ -76,7 +76,7 @@ void CheckIndexingJob::slotCollectionPropertiesFinished(KJob *job)
mCollection
=
fetch
->
collections
().
first
();
const
qlonglong
result
=
mIndexedItems
->
indexedItems
(
mCollection
.
id
());
bool
needToReindex
=
false
;
qCDebug
(
KMAIL_LOG
)
<<
"name :"
<<
mCollection
.
name
()
<<
" mCollection.statistics().count() "
<<
mCollection
.
statistics
().
count
()
<<
"stats.value(mCollection.id())"
<<
result
;
qCDebug
(
KMAIL_LOG
)
<<
"name :"
<<
mCollection
.
name
()
<<
" mCollection.statistics().count() "
<<
mCollection
.
statistics
().
count
()
<<
"stats.value(mCollection.id())"
<<
result
;
if
(
mCollection
.
statistics
().
count
()
!=
result
)
{
needToReindex
=
true
;
qCDebug
(
KMAIL_LOG
)
<<
"Reindex collection :"
<<
"name :"
<<
mCollection
.
name
();
...
...
kmail/src/search/checkindexingmanager.cpp
View file @
ed2d826a
...
...
@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#include "checkindexingmanager.h"
#include "kmail_debug.h"
#include "checkindexingjob.h"
...
...
@@ -54,7 +53,7 @@ CheckIndexingManager::~CheckIndexingManager()
void
CheckIndexingManager
::
start
(
QAbstractItemModel
*
collectionModel
)
{
if
(
mIsReady
)
{
if
(
mIsReady
)
{
const
KSharedConfig
::
Ptr
cfg
=
KSharedConfig
::
openConfig
(
QStringLiteral
(
"kmailsearchindexingrc"
));
KConfigGroup
grp
=
cfg
->
group
(
QStringLiteral
(
"General"
));
const
QDateTime
lastDateTime
=
grp
.
readEntry
(
QStringLiteral
(
"lastCheck"
),
QDateTime
());
...
...
kmail/src/searchdialog/incompleteindexdialog.cpp
View file @
ed2d826a
...
...
@@ -100,7 +100,6 @@ private:
QHash
<
qint64
,
bool
>
mFilterCollections
;
};
IncompleteIndexDialog
::
IncompleteIndexDialog
(
const
QVector
<
qint64
>
&
unindexedCollections
,
QWidget
*
parent
)
:
KDialog
(
parent
)
,
mUi
(
new
Ui
::
IncompleteIndexDialog
)
...
...
@@ -141,9 +140,9 @@ IncompleteIndexDialog::~IncompleteIndexDialog()
void
IncompleteIndexDialog
::
slotButtonClicked
(
int
btn
)
{
if
(
btn
==
Ok
)
{
waitForIndexer
();
waitForIndexer
();
}
else
{
KDialog
::
slotButtonClicked
(
btn
);
KDialog
::
slotButtonClicked
(
btn
);
}
}
...
...
@@ -187,11 +186,10 @@ void IncompleteIndexDialog::waitForIndexer()
QLatin1String
(
"org.freedesktop.Akonadi.BalooIndexer"
),
QDBusConnection
::
sessionBus
(),
this
);
if
(
!
mIndexer
->
isValid
())
{
accept
();
return
;
accept
();
return
;
}
mProgressDialog
=
new
KProgressDialog
(
this
);
mProgressDialog
->
progressBar
()
->
setMaximum
(
mIndexingQueue
.
size
());
mProgressDialog
->
progressBar
()
->
setValue
(
0
);
...
...
@@ -207,8 +205,8 @@ void IncompleteIndexDialog::waitForIndexer()
}
if
(
mIndexingQueue
.
isEmpty
())
{
accept
();
return
;
accept
();
return
;
}
mProgressDialog
->
show
();
...
...
@@ -224,12 +222,12 @@ void IncompleteIndexDialog::slotCurrentlyIndexingCollectionChanged(qlonglong col
{
const
int
idx
=
mIndexingQueue
.
indexOf
(
colId
);
if
(
idx
>
-
1
)
{
mIndexingQueue
.
remove
(
idx
);
mIndexingQueue
.
remove
(
idx
);
}
mProgressDialog
->
progressBar
()
->
setValue
(
mProgressDialog
->
progressBar
()
->
maximum
()
-
mIndexingQueue
.
size
());
if
(
mIndexingQueue
.
isEmpty
())
{
QTimer
::
singleShot
(
1000
,
this
,
SLOT
(
accept
()));
QTimer
::
singleShot
(
1000
,
this
,
SLOT
(
accept
()));
}
}
kmail/src/searchdialog/incompleteindexdialog.h
View file @
ed2d826a
...
...
@@ -56,5 +56,4 @@ private:
QVector
<
qint64
>
mIndexingQueue
;
};
#endif
kmail/src/searchdialog/searchwindow.cpp
View file @
ed2d826a
...
...
@@ -144,7 +144,6 @@ SearchWindow::SearchWindow(KMMainWidget *widget, const Akonadi::Collection &coll
connect
(
KMKernel
::
self
()
->
folderCollectionMonitor
(),
&
Akonadi
::
Monitor
::
collectionStatisticsChanged
,
this
,
&
SearchWindow
::
updateCollectionStatistic
);
connect
(
mUi
.
mSearchFolderEdt
,
&
KLineEdit
::
textChanged
,
this
,
&
SearchWindow
::
scheduleRename
);
connect
(
&
mRenameTimer
,
&
QTimer
::
timeout
,
this
,
&
SearchWindow
::
renameSearchFolder
);
connect
(
mUi
.
mSearchFolderOpenBtn
,
&
QPushButton
::
clicked
,
this
,
&
SearchWindow
::
openSearchFolder
);
...
...
@@ -367,16 +366,16 @@ void SearchWindow::activateFolder(const Akonadi::Collection &collection)
}
mUi
.
mPatternEdit
->
setSearchPattern
(
&
mSearchPattern
);
if
(
currentFolderIsSearchFolder
)
{
if
(
currentFolderIsSearchFolder
)
{
mFolder
=
collection
;
mUi
.
mSearchFolderEdt
->
setText
(
collection
.
name
()
);
mUi
.
mSearchFolderEdt
->
setText
(
collection
.
name
()
);
createSearchModel
();
}
else
if
(
mUi
.
mSearchFolderEdt
->
text
().
isEmpty
()
)
{
mUi
.
mSearchFolderEdt
->
setText
(
i18n
(
"Last Search"
)
);
}
else
if
(
mUi
.
mSearchFolderEdt
->
text
().
isEmpty
()
)
{
mUi
.
mSearchFolderEdt
->
setText
(
i18n
(
"Last Search"
)
);
// find last search and reuse it if possible
mFolder
=
CommonKernel
->
collectionFromId
(
KMailSettings
::
lastSearchCollectionId
()
);
mFolder
=
CommonKernel
->
collectionFromId
(
KMailSettings
::
lastSearchCollectionId
()
);
// when the last folder got renamed, create a new one
if
(
mFolder
.
isValid
()
&&
mFolder
.
name
()
!=
mUi
.
mSearchFolderEdt
->
text
()
)
{
if
(
mFolder
.
isValid
()
&&
mFolder
.
name
()
!=
mUi
.
mSearchFolderEdt
->
text
()
)
{
mFolder
=
Akonadi
::
Collection
();
}
}
...
...
@@ -596,7 +595,7 @@ void SearchWindow::searchDone(KJob *job)
void
SearchWindow
::
slotCollectionStatisticsRetrieved
(
KJob
*
job
)
{
Akonadi
::
CollectionFetchJob
*
fetch
=
qobject_cast
<
Akonadi
::
CollectionFetchJob
*>
(
job
);
Akonadi
::
CollectionFetchJob
*
fetch
=
qobject_cast
<
Akonadi
::
CollectionFetchJob
*>
(
job
);
if
(
!
fetch
||
fetch
->
error
())
{
return
;
}
...
...
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