Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Utilities
Konsole
Commits
23cda609
Commit
23cda609
authored
Mar 30, 2014
by
Kurt Hindenburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert from KUrlCompletion to QFileSystemModel + QCompleter
parent
8c6c87f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
src/ColorSchemeEditor.cpp
src/ColorSchemeEditor.cpp
+9
-4
No files found.
src/ColorSchemeEditor.cpp
View file @
23cda609
...
...
@@ -23,6 +23,8 @@
// Qt
#include <QtGui/QFontMetrics>
#include <QtCore/QFileInfo>
#include <QCompleter>
#include <QFileSystemModel>
// KDE
#include <KColorDialog>
...
...
@@ -78,10 +80,13 @@ ColorSchemeEditor::ColorSchemeEditor(QWidget* aParent)
SLOT
(
setRandomizedBackgroundColor
(
bool
)));
// wallpaper stuff
#pragma message("Look at this setCompletionObject again")
// KUrlCompletion* fileCompletion = new KUrlCompletion(KUrlCompletion::FileCompletion);
// fileCompletion->setParent(this);
// _ui->wallpaperPath->setCompletionObject(fileCompletion);
QFileSystemModel
*
dirModel
=
new
QFileSystemModel
(
this
);
dirModel
->
setFilter
(
QDir
::
AllEntries
);
dirModel
->
setRootPath
(
QString
(
'/'
));
QCompleter
*
completer
=
new
QCompleter
(
this
);
completer
->
setModel
(
dirModel
);
_ui
->
wallpaperPath
->
setCompleter
(
completer
);
_ui
->
wallpaperPath
->
setClearButtonEnabled
(
true
);
_ui
->
wallpaperSelectButton
->
setIcon
(
KIcon
(
"image-x-generic"
));
...
...
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