mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-11 00:37:31 +02:00
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
--- kinyin-0.43.orig/qt4/edwidget.cc 2009-07-21 10:55:43.000000000 +0400
|
|
+++ kinyin-0.43/qt4/edwidget.cc 2011-02-26 00:31:56.000000000 +0300
|
|
@@ -177,7 +177,16 @@
|
|
}
|
|
void EdWidget::open() {
|
|
#ifndef QT_NO_FILEDIALOG
|
|
- QString fname = QFileDialog::getOpenFileName( this);
|
|
+ QFileDialog dlg;
|
|
+ QStringList fnames;
|
|
+ QString fname;
|
|
+ dlg.resize(320,240);
|
|
+ dlg.setFileMode(QFileDialog::ExistingFile);
|
|
+ if (dlg.exec()) {
|
|
+ fnames = dlg.selectedFiles();
|
|
+ fname = fnames[0];
|
|
+ }
|
|
+ //QString fname = QFileDialog::getOpenFileName( this);
|
|
QFile file( fname );
|
|
if ( file.open( QFile::ReadOnly ) ) {
|
|
QTextStream tstream( &file );
|
|
@@ -189,7 +198,16 @@
|
|
}
|
|
void EdWidget::save() {
|
|
#ifndef QT_NO_FILEDIALOG
|
|
- QString fname = QFileDialog::getSaveFileName( this );
|
|
+ QFileDialog dlg;
|
|
+ QStringList fnames;
|
|
+ QString fname;
|
|
+ dlg.resize(320,240);
|
|
+ dlg.setFileMode(QFileDialog::AnyFile);
|
|
+ if (dlg.exec()) {
|
|
+ fnames = dlg.selectedFiles();
|
|
+ fname = fnames[0];
|
|
+ }
|
|
+ //QString fname = QFileDialog::getSaveFileName( this );
|
|
QFile file( fname );
|
|
if ( file.open( QFile::WriteOnly ) ) {
|
|
QTextStream tstream(&file);
|