aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2017-09-07 18:05:30 -0400
committerZackaryWelch <welch.zackary@gmail.com>2017-09-07 18:05:30 -0400
commit2c3ebcb7558125e112ed08b76e50da8d7a3fc60b (patch)
tree14f9a8207b31407b873c104ac7eb9710a1c4e764 /src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
parentwrite auto-archival methods for file manager integration (diff)
downloadlumina-2c3ebcb7558125e112ed08b76e50da8d7a3fc60b.tar.gz
lumina-2c3ebcb7558125e112ed08b76e50da8d7a3fc60b.tar.bz2
lumina-2c3ebcb7558125e112ed08b76e50da8d7a3fc60b.zip
Fixed bug with lumina-fm editing default configuration file as root
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
index 78759aa2..8273d09c 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
@@ -28,7 +28,7 @@
#define DEBUG 0
-DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){
+DirWidget::DirWidget(QString objID, QSettings *settings, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){
ui->setupUi(this); //load the designer file
ID = objID;
//Assemble the toolbar for the widget
@@ -54,6 +54,7 @@ DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new U
toolbar->addAction(ui->actionDualColumn);
columnActionGroup->addAction(ui->actionDualColumn);
toolbar->addAction(ui->actionMenu);
+ this->settings = settings;
//Add the browser widgets
RCBW = 0; //right column browser is unavailable initially
BW = new BrowserWidget("", this);
@@ -340,8 +341,7 @@ void DirWidget::on_tool_zoom_in_clicked(){
size += 16;
setThumbnailSize(size);
//Now Save the size value as the default for next time
- QSettings SET("lumina-desktop","lumina-fm");
- SET.setValue("iconsize", size);
+ settings->setValue("iconsize", size);
}
void DirWidget::on_tool_zoom_out_clicked(){
@@ -350,8 +350,7 @@ void DirWidget::on_tool_zoom_out_clicked(){
size -= 16;
setThumbnailSize(size);
//Now Save the size value as the default for next time
- QSettings SET("lumina-desktop","lumina-fm");
- SET.setValue("iconsize", size);
+ settings->setValue("iconsize", size);
}
// -- Top Snapshot Buttons
bgstack15