Check-in Number:
|
3887 | |
Date: |
2002-Dec-16 18:37:39 (local)
2002-Dec-16 17:37:39 (UTC) |
User: | ms |
Branch: | |
Comment: |
Implement Darueberknallen protection. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/as/as-gui/TODO 1.47 -> 1.48
--- TODO 2002/12/16 16:05:57 1.47
+++ TODO 2002/12/16 17:37:39 1.48
@@ -23,10 +23,9 @@
Implement missing interface methods
Review destruction of all members, compare with setupPrefs
Memory optimization needed in tidataops
-QTable::valueChanged(int row, int col) should be responsible for dirty flag
+Check all identifiers for undeutig unique scope
Remove magic numbers from cpp files to titconst like TITRAQ_INDEXREMARK
Reduce dependence to STL by removing cout to QTextStream
-Check all identifiers for undeutig unique scope
Some signals implemented in Titraqform really belong in satellite classes
Write M4 macro for detecting cuserid, and prefer cuserid in ac_assist when present
Krass date block data shading keyed to sort function
@@ -36,7 +35,6 @@
IDs in as_const.h much better choosing, so they make sense
Make edit control window optional through preferences
Add customizable column ordering by click and drag
-Vor darueberknallen ein Datei, gib mal ne Warning
Method refreshDisplay is too expensive to process
Preferences
|
|
ossp-pkg/as/as-gui/as_const.h 1.28 -> 1.29
--- as_const.h 2002/12/16 17:13:17 1.28
+++ as_const.h 2002/12/16 17:37:39 1.29
@@ -130,6 +130,7 @@
#define TITRAQ_DATEZERO "0000-00-00"
#define TITRAQ_SEPARATORTOK " "
#define TITRAQ_SAVEFIRST "The timesheet contains unsaved changes\nDo you want to save the changes or discard them?"
+#define TITRAQ_OVERWRITE "A file already exists with the chosen name\nDo you want to overwrite it with new data?"
// Indexes of table columns
#define TITRAQ_IDXALLCTRLS -1
|
|
ossp-pkg/as/as-gui/as_slot.cpp 1.65 -> 1.66
--- as_slot.cpp 2002/12/16 17:13:17 1.65
+++ as_slot.cpp 2002/12/16 17:37:39 1.66
@@ -455,11 +455,26 @@
//
void Titraqform::saveAs(void)
{
+ int nResult = 0; // For checking user's answer
+
// First get the selected file name to save to
QString Filestring = QFileDialog::getSaveFileName(QString::null, QString::null, this);
if (!Filestring.isEmpty()) {
*m_szFilename = Filestring;
- saveFile(); // Finish off by calling the save action
+ if (QFile::exists(*m_szFilename)) {
+ nResult = QMessageBox::warning(this, trUtf8(TITRAQ_APPTITLE),
+ trUtf8(TITRAQ_OVERWRITE), trUtf8("&Yes"), trUtf8("&No"), NULL, 1, 1);
+ switch (nResult) {
+ case 0: // Overwrite contents
+ this->saveFile();
+ break;
+ case 1: // Don't overwrite
+ default:
+ break;
+ }
+ }
+ else
+ saveFile(); // Finish off by calling the save action
}
else {
// User did not select a valid file and push okay button
|
|