diff options
Diffstat (limited to 'src/Fl_Native_File_Chooser_Kdialog.cxx')
| -rw-r--r-- | src/Fl_Native_File_Chooser_Kdialog.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_Native_File_Chooser_Kdialog.cxx b/src/Fl_Native_File_Chooser_Kdialog.cxx index 68cb4729e..f4039366c 100644 --- a/src/Fl_Native_File_Chooser_Kdialog.cxx +++ b/src/Fl_Native_File_Chooser_Kdialog.cxx @@ -47,7 +47,8 @@ Fl_Kdialog_Native_File_Chooser_Driver::Fl_Kdialog_Native_File_Chooser_Driver(int Fl_Kdialog_Native_File_Chooser_Driver::~Fl_Kdialog_Native_File_Chooser_Driver() { - for (int i = 0; i < _tpathnames; i++) delete[] _pathnames[i]; + int i; + for (i = 0; i < _tpathnames; i++) delete[] _pathnames[i]; delete[] _pathnames; if (_preset_file) free(_preset_file); if (_directory) free(_directory); @@ -122,6 +123,7 @@ void Fl_Kdialog_Native_File_Chooser_Driver::build_command(char *command, int max int Fl_Kdialog_Native_File_Chooser_Driver::show() { + int i; if (_btype == Fl_Native_File_Chooser::BROWSE_MULTI_DIRECTORY) { // BROWSE_MULTI_DIRECTORY is not supported by kdialog, run GTK chooser instead Fl_Native_File_Chooser fnfc(Fl_Native_File_Chooser::BROWSE_MULTI_DIRECTORY); @@ -131,12 +133,12 @@ int Fl_Kdialog_Native_File_Chooser_Driver::show() { fnfc.filter(filter()); fnfc.options(options()); int retval = fnfc.show(); - for (int i = 0; i < _tpathnames; i++) delete[] _pathnames[i]; + for (i = 0; i < _tpathnames; i++) delete[] _pathnames[i]; delete[] _pathnames; _pathnames = NULL; _tpathnames = fnfc.count(); if (_tpathnames && retval == 0) { _pathnames = new char*[_tpathnames]; - for (int i = 0; i < _tpathnames; i++) { + for (i = 0; i < _tpathnames; i++) { _pathnames[i] = new char[strlen(fnfc.filename(i))+1]; strcpy(_pathnames[i], fnfc.filename(i)); } @@ -167,7 +169,7 @@ int Fl_Kdialog_Native_File_Chooser_Driver::show() { if (data.all_files) { // process text received from pipe if (data.all_files[strlen(data.all_files)-1] == '\n') data.all_files[strlen(data.all_files)-1] = 0; - for (int i = 0; i < _tpathnames; i++) delete[] _pathnames[i]; + for (i = 0; i < _tpathnames; i++) delete[] _pathnames[i]; delete[] _pathnames; char *p = data.all_files; int count = 1; |
