Re: Error compile: ‘class QDateTime’ has no member named ‘msecsTo’

Posted by R. van Twisk on
URL: https://forum.librecad.org/Error-compile-class-QDateTime-has-no-member-named-msecsTo-tp5706903p5706909.html

I think as LibreCAD we should see if we can lower the requirements somewhat for LibreCAD to 4.6

can you try this patch and see if it compiles?

index 4cfdca8..2bf3c50 100644
--- a/librecad/src/lib/gui/rs_graphicview.cpp
+++ b/librecad/src/lib/gui/rs_graphicview.cpp
@@ -728,10 +728,10 @@ void RS_GraphicView::zoomPrevious() {
  * switch back later with @see restoreView().
  */
 void RS_GraphicView::saveView() {
-    QDateTime t=QDateTime::currentDateTime();
+    QDateTime noUpdateWindow=QDateTime::currentDateTime().addMSecs(-500);
     //do not update view within 500 milliseconds
-    if(previousViewTime.msecsTo(t)< 500) return;
-    previousViewTime = t;
+    if(previousViewTime > noUpdateWindow) return;
+    previousViewTime = QDateTime::currentDateTime();
     savedViews[savedViewIndex]=std::make_tuple(offsetX,offsetY,factor);
     savedViewIndex = (savedViewIndex+1)%savedViews.size();
     if(savedViewCount<savedViews.size()) savedViewCount++;


Ries



On Jul 19, 2012, at 5:33 PM, diegoroman17_2 [via LibreCAD] wrote:

I am using Linux Ubuntu Lucid (10.04). If I do:

sudo apt-get install libqt4-dev

It install qt version 4:4.6.2. It version is qt to Lucid but not compile LibreCAD.

Please help me. How I can upgrade version qt in my Lucid?


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/Error-compile-class-QDateTime-has-no-member-named-msecsTo-tp5706903p5706908.html
To start a new topic under LibreCAD, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML