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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

diegoroman17_2

Hi guys,

I have download the last version of source code LibreCAD but if I compile this I obtain the next error:

lib/gui/rs_graphicview.cpp:733: error: ‘class QDateTime’ has no member named ‘msecsTo’

I have installed qt4 in my computer.
Reply | Threaded
Open this post in threaded view
|

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

R. van Twisk
Administrator
Hey,

is it possible that you upgrade to a version of Qt of at least 4.7 ?

We have tried to keep the requirements to a version of 4.4 and higher, but I think we may need to revise that.

Ries


On Jul 18, 2012, at 6:46 PM, diegoroman17_2 [via LibreCAD] wrote:



Hi guys,

I have download the last version of source code LibreCAD but if I compile this I obtain the next error:

lib/gui/rs_graphicview.cpp:733: error: ‘class QDateTime’ has no member named ‘msecsTo’

I have installed qt4 in my computer.



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-tp5706903.html
To start a new topic under LibreCAD, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

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

diegoroman17_2
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?
Reply | Threaded
Open this post in threaded view
|

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

R. van Twisk
Administrator
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

Reply | Threaded
Open this post in threaded view
|

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

diegoroman17_2
Thanks my friend. Now LibreCAD compile