[qet] [3522] Remove obsolete method |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3522
Author: blacksun
Date: 2014-11-27 18:47:01 +0100 (Thu, 27 Nov 2014)
Log Message:
-----------
Remove obsolete method
Modified Paths:
--------------
trunk/sources/qetproject.cpp
trunk/sources/qetproject.h
Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp 2014-11-26 22:44:33 UTC (rev 3521)
+++ trunk/sources/qetproject.cpp 2014-11-27 17:47:01 UTC (rev 3522)
@@ -1428,21 +1428,6 @@
}
/**
- Cette methode sert a reperer un projet vide, c-a-d un projet identique a ce
- que l'on obtient en faisant Fichier > Nouveau.
- @return true si les schemas de ce projet ont ete modifies
- Concretement, il doit y avoir exactement un schema, dont la pile
- d'annulation est "clean".
-*/
-bool QETProject::diagramsWereModified() {
- // il doit y avoir exactement un schema
- if (diagrams_.count() != 1) return(true);
-
- // dont la pile d'annulation est "clean"
- return(!(diagrams_[0] -> undoStack().isClean() && !diagrams_[0] -> wasWritten()));
-}
-
-/**
@return the project-wide properties made available to child diagrams.
*/
DiagramContext QETProject::projectProperties() {
@@ -1467,12 +1452,15 @@
@see diagramsWereModified(), embeddedCollectionWasModified()
*/
bool QETProject::projectWasModified() {
- if (projectOptionsWereModified()) return(true);
- if (diagramsWereModified()) return(true);
- if (embeddedCollectionWasModified()) return(true);
- if (titleBlockTemplateCollectionWasModified()) return(true);
+
+ if ( projectOptionsWereModified() ||
+ !undo_stack_ -> isClean() ||
+ embeddedCollectionWasModified() ||
+ titleBlockTemplateCollectionWasModified() )
+ return(true);
- return(false);
+ else
+ return(false);
}
/**
Modified: trunk/sources/qetproject.h
===================================================================
--- trunk/sources/qetproject.h 2014-11-26 22:44:33 UTC (rev 3521)
+++ trunk/sources/qetproject.h 2014-11-27 17:47:01 UTC (rev 3522)
@@ -137,7 +137,6 @@
bool projectOptionsWereModified();
bool embeddedCollectionWasModified();
bool titleBlockTemplateCollectionWasModified();
- bool diagramsWereModified();
DiagramContext projectProperties();
void setProjectProperties(const DiagramContext &);
QUndoStack* undoStack() {return undo_stack_;}