Index: ossp-pkg/as/as-gui/TODO RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v rcsdiff -q -kk '-r1.7' '-r1.8' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v' 2>/dev/null --- TODO 2002/11/19 19:42:14 1.7 +++ TODO 2002/11/21 15:37:08 1.8 @@ -16,6 +16,7 @@ QWhatsThis::add(m_pAddbutton, trUtf8("Para soltar la pepa")); configure soll ueberpruefen ob libqt[-mt] threads braucht, dann wenn so, soll den LIBS -pthread hardgecodet haben +Report errors in all slot code by throwing exceptions Dreams ------ Index: ossp-pkg/as/as-gui/as_assist.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v rcsdiff -q -kk '-r1.7' '-r1.8' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2002/11/20 19:37:27 1.7 +++ as_assist.cpp 2002/11/21 15:37:08 1.8 @@ -112,7 +112,7 @@ m_pFileopenact = new QAction(trUtf8("Open File"), QPixmap(s_kpcFileopen_xpm), trUtf8("&Open..."), CTRL+Key_O, this, "Open"); if (m_pFileopenact == NULL) // Sanity check throw Genexcept("Main window file open action creation failed."); - connect(m_pFileopenact, SIGNAL(activated()), this, SLOT(choose())); + connect(m_pFileopenact, SIGNAL(activated()), this, SLOT(chooseFile())); const char *kszFileopentext = trUtf8("
"
"Click this button to open a new file."
"You can also select the Open command "
@@ -123,7 +123,7 @@
m_pFilesaveact = new QAction(trUtf8("Save File"), QPixmap(s_kpcFilesave_xpm), trUtf8("&Save"), CTRL+Key_S, this, "Save");
if (m_pFilesaveact == NULL) // Sanity check
throw Genexcept("Main window file save action creation failed.");
- connect(m_pFilesaveact, SIGNAL(activated()), this, SLOT(save()));
+ connect(m_pFilesaveact, SIGNAL(activated()), this, SLOT(saveFile()));
const char *kszFilesavetext = trUtf8("
"
"Click this button to save the file you "
"are editing. You will be prompted for a file name.\n"
Index: ossp-pkg/as/as-gui/as_gui.h
RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v
rcsdiff -q -kk '-r1.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v' 2>/dev/null
--- as_gui.h 2002/11/20 11:06:32 1.15
+++ as_gui.h 2002/11/21 15:37:08 1.16
@@ -64,9 +64,9 @@
void delEntry(void); // Delete a task entry from the list
void writeEntry(void); // Write the task list to a filedescriptor
void newDoc(void); // Make and display a new document window
- void choose(void); // Choose a file using a handy file dialog
- void load(const QString &); // Load accounting data into main window
- void save(void); // Serialize to the current file
+ void chooseFile(void); // Choose a file using a handy file dialog
+ void loadData(const QString &); // Load accounting data into main window
+ void saveFile(void); // Serialize to the current file
void saveAs(void); // Serialize to a selected file
void helpContents(void); // Use the help contents
void aboutTitraq(void); // Learn more about this program itself
Index: ossp-pkg/as/as-gui/as_slot.cpp
RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v
rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null
--- as_slot.cpp 2002/11/20 11:06:32 1.5
+++ as_slot.cpp 2002/11/21 15:37:08 1.6
@@ -28,7 +28,7 @@
}
//
-// Choose a file using a handy file dialog
+// Delete a row entry from the current data window
//
void Titraqform::delEntry(void)
{
@@ -59,11 +59,11 @@
//
// Choose a file using a handy file dialog
//
-void Titraqform::choose(void)
+void Titraqform::chooseFile(void)
{
- QString Filestring = QFileDialog::getOpenFileName(QString::null, QString::null, this);
+ QString Filestring = QFileDialog::getOpenFileName("/e/dev/as", QString::null, this, trUtf8("Chooser Dialog"), trUtf8("Choose a file to open"));
if (!Filestring.isEmpty())
- load(Filestring);
+ loadData(Filestring);
else
m_pStatbar->message(trUtf8("Loading aborted"), 4000);
}
@@ -71,7 +71,7 @@
//
// Load accounting data into main window
//
-void Titraqform::load(const QString &Filestring)
+void Titraqform::loadData(const QString &Filestring)
{
QFile Filetemp(Filestring); // File to load
@@ -88,7 +88,7 @@
//
// Serialize current state to the current file
//
-void Titraqform::save(void)
+void Titraqform::saveFile(void)
{
// First time saves are really just saveAs in disguise
if (m_szFilename->isEmpty()) {
@@ -96,8 +96,7 @@
return;
}
- // Try to read the status text, and write it to a file
- QString Statustext = m_pRemark->text();
+ // Try to open a file for writing to
QFile Filetemp(*m_szFilename);
if (!Filetemp.open(IO_WriteOnly)) {
m_pStatbar->message(QString(trUtf8("Could not write to %1")).arg(*m_szFilename), 4000);
@@ -106,7 +105,7 @@
// Serialize file contents and write to text line
QTextStream Filestream(&Filetemp);
- Filestream << Statustext;
+ Filestream << m_pRemark->text();
Filetemp.close();
// Reset the text line, and give output to main window
@@ -125,8 +124,7 @@
QString Filestring = QFileDialog::getSaveFileName(QString::null, QString::null, this);
if (!Filestring.isEmpty()) {
*m_szFilename = Filestring;
- m_pRemark->setText(*m_szFilename);
- save(); // Finish off by calling the save action
+ saveFile(); // Finish off by calling the save action
}
else {
// User did not select a valid file and push okay button
@@ -150,7 +148,7 @@
trUtf8("The document has been\nchanged since the last save.")),
trUtf8("Save Now"), trUtf8("Cancel"), trUtf8("Leave Anyway"), 0, 1) {
case 0:
- save();
+ saveFile();
pClosit->accept();
break;
case 1: