-rw-r--r-- | core/apps/textedit/filePermissions.cpp | 2 | ||||
-rw-r--r-- | core/apps/textedit/textedit.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/filebrowser/filePermissions.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/apps/textedit/filePermissions.cpp b/core/apps/textedit/filePermissions.cpp index 1938b84..5af3971 100644 --- a/core/apps/textedit/filePermissions.cpp +++ b/core/apps/textedit/filePermissions.cpp | |||
@@ -137,33 +137,33 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal | |||
137 | LineEdit1->setText( file); | 137 | LineEdit1->setText( file); |
138 | OwnerLineEdit->setText( fi.owner()); | 138 | OwnerLineEdit->setText( fi.owner()); |
139 | GroupLineEdit->setText( fi.group()); | 139 | GroupLineEdit->setText( fi.group()); |
140 | 140 | ||
141 | if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); } | 141 | if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); } |
142 | if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); } | 142 | if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); } |
143 | if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); } | 143 | if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); } |
144 | 144 | ||
145 | if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); } | 145 | if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); } |
146 | if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); } | 146 | if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); } |
147 | if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); } | 147 | if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); } |
148 | 148 | ||
149 | if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); } | 149 | if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); } |
150 | if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); } | 150 | if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); } |
151 | if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); } | 151 | if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); } |
152 | 152 | ||
153 | lstat(file.latin1(), &buf); | 153 | stat(file.latin1(), &buf); |
154 | mode = buf.st_mode; | 154 | mode = buf.st_mode; |
155 | modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) ); | 155 | modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) ); |
156 | ModeLine->setText(modeStr); | 156 | ModeLine->setText(modeStr); |
157 | bool ok; | 157 | bool ok; |
158 | i_mode = modeStr.toInt(&ok,10); | 158 | i_mode = modeStr.toInt(&ok,10); |
159 | 159 | ||
160 | } | 160 | } |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * Destroys the object and frees any allocated resources | 163 | * Destroys the object and frees any allocated resources |
164 | */ | 164 | */ |
165 | filePermissions::~filePermissions() | 165 | filePermissions::~filePermissions() |
166 | { | 166 | { |
167 | } | 167 | } |
168 | 168 | ||
169 | 169 | ||
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 515fcdc..603f032 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -692,33 +692,33 @@ void TextEdit::showEditTools() | |||
692 | setWState (WState_Reserved1 ); | 692 | setWState (WState_Reserved1 ); |
693 | } | 693 | } |
694 | 694 | ||
695 | /*! | 695 | /*! |
696 | unprompted save */ | 696 | unprompted save */ |
697 | bool TextEdit::save() | 697 | bool TextEdit::save() |
698 | { | 698 | { |
699 | QString file = doc->file(); | 699 | QString file = doc->file(); |
700 | QString name= doc->name(); | 700 | QString name= doc->name(); |
701 | 701 | ||
702 | QString rt = editor->text(); | 702 | QString rt = editor->text(); |
703 | currentFileName= name ; | 703 | currentFileName= name ; |
704 | qDebug("saveFile "+currentFileName); | 704 | qDebug("saveFile "+currentFileName); |
705 | 705 | ||
706 | struct stat buf; | 706 | struct stat buf; |
707 | mode_t mode; | 707 | mode_t mode; |
708 | lstat(file.latin1(), &buf); | 708 | stat(file.latin1(), &buf); |
709 | mode = buf.st_mode; | 709 | mode = buf.st_mode; |
710 | 710 | ||
711 | doc->setName( name); | 711 | doc->setName( name); |
712 | FileManager fm; | 712 | FileManager fm; |
713 | if ( !fm.saveFile( *doc, rt ) ) { | 713 | if ( !fm.saveFile( *doc, rt ) ) { |
714 | return false; | 714 | return false; |
715 | } | 715 | } |
716 | editor->setEdited( false ); | 716 | editor->setEdited( false ); |
717 | 717 | ||
718 | chmod( file.latin1(), mode); | 718 | chmod( file.latin1(), mode); |
719 | return true; | 719 | return true; |
720 | } | 720 | } |
721 | 721 | ||
722 | /*! | 722 | /*! |
723 | prompted save */ | 723 | prompted save */ |
724 | bool TextEdit::saveAs() | 724 | bool TextEdit::saveAs() |
diff --git a/noncore/unsupported/filebrowser/filePermissions.cpp b/noncore/unsupported/filebrowser/filePermissions.cpp index 1938b84..5af3971 100644 --- a/noncore/unsupported/filebrowser/filePermissions.cpp +++ b/noncore/unsupported/filebrowser/filePermissions.cpp | |||
@@ -137,33 +137,33 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal | |||
137 | LineEdit1->setText( file); | 137 | LineEdit1->setText( file); |
138 | OwnerLineEdit->setText( fi.owner()); | 138 | OwnerLineEdit->setText( fi.owner()); |
139 | GroupLineEdit->setText( fi.group()); | 139 | GroupLineEdit->setText( fi.group()); |
140 | 140 | ||
141 | if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); } | 141 | if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); } |
142 | if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); } | 142 | if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); } |
143 | if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); } | 143 | if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); } |
144 | 144 | ||
145 | if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); } | 145 | if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); } |
146 | if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); } | 146 | if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); } |
147 | if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); } | 147 | if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); } |
148 | 148 | ||
149 | if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); } | 149 | if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); } |
150 | if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); } | 150 | if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); } |
151 | if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); } | 151 | if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); } |
152 | 152 | ||
153 | lstat(file.latin1(), &buf); | 153 | stat(file.latin1(), &buf); |
154 | mode = buf.st_mode; | 154 | mode = buf.st_mode; |
155 | modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) ); | 155 | modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) ); |
156 | ModeLine->setText(modeStr); | 156 | ModeLine->setText(modeStr); |
157 | bool ok; | 157 | bool ok; |
158 | i_mode = modeStr.toInt(&ok,10); | 158 | i_mode = modeStr.toInt(&ok,10); |
159 | 159 | ||
160 | } | 160 | } |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * Destroys the object and frees any allocated resources | 163 | * Destroys the object and frees any allocated resources |
164 | */ | 164 | */ |
165 | filePermissions::~filePermissions() | 165 | filePermissions::~filePermissions() |
166 | { | 166 | { |
167 | } | 167 | } |
168 | 168 | ||
169 | 169 | ||