Samuel Thibault лет назад: 8
Родитель
Сommit
b38758b022

+ 4 - 0
starpu-top/communicationmanager.cpp

@@ -1289,7 +1289,11 @@ void CommunicationManager::sendMessage(QString messageString)
 {
     messageString.append(COM_MSG_ENDL);
 
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+    write(messageString.toLatin1());
+#else
     write(messageString.toAscii());
+#endif
 }
 
 void CommunicationManager::sendGoMessage()

+ 1 - 1
starpu-top/main.cpp

@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
 
-#include <QtGui/QApplication>
+#include <QApplication>
 #include "mainwindow.h"
 #include <string.h>
 #include <config.h>

+ 2 - 0
starpu-top/qwt/qwt_knob.cpp

@@ -492,7 +492,9 @@ void QwtKnob::scaleChange()
 */
 void QwtKnob::fontChange( const QFont &f )
 {
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QwtAbstractSlider::fontChange( f );
+#endif
     layoutKnob();
 }
 

+ 2 - 2
starpu-top/qwt/qwt_painter.cpp

@@ -224,7 +224,7 @@ void QwtPainter::fillRect( QPainter *painter,
 
     QRectF r = rect;
     if ( deviceClipping )
-        r = r.intersect( clipRect );
+        r = r.intersected( clipRect );
 
     if ( r.isValid() )
         painter->fillRect( r, brush );
@@ -398,7 +398,7 @@ void QwtPainter::drawPolyline( QPainter *painter,
     if ( deviceClipping )
     {
         QPolygonF polygon( pointCount );
-        qMemCopy( polygon.data(), points, pointCount * sizeof( QPointF ) );
+        memcpy( polygon.data(), points, pointCount * sizeof( QPointF ) );
 
         polygon = QwtClipper::clipPolygonF( clipRect, polygon );
         ::drawPolyline( painter,

+ 2 - 2
starpu-top/qwt/qwt_plot.cpp

@@ -372,9 +372,9 @@ void QwtPlot::updateLayout()
             {
                 QRegion r( scaleRect[axisId] );
                 if ( axisEnabled( yLeft ) )
-                    r = r.subtract( QRegion( scaleRect[yLeft] ) );
+                    r = r.subtracted( QRegion( scaleRect[yLeft] ) );
                 if ( axisEnabled( yRight ) )
-                    r = r.subtract( QRegion( scaleRect[yRight] ) );
+                    r = r.subtracted( QRegion( scaleRect[yRight] ) );
                 r.translate( -d_data->layout->scaleRect( axisId ).x(),
                     -scaleRect[axisId].y() );
 

+ 1 - 1
starpu-top/qwt/qwt_plot_layout.cpp

@@ -1131,7 +1131,7 @@ void QwtPlotLayout::activate( const QwtPlot *plot,
         // subtract d_data->legendRect from rect
 
         const QRegion region( rect.toRect() );
-        rect = region.subtract( d_data->legendRect.toRect() ).boundingRect();
+        rect = region.subtracted( d_data->legendRect.toRect() ).boundingRect();
 
         switch ( d_data->legendPos )
         {

+ 2 - 2
starpu-top/qwt/qwt_series_data.cpp

@@ -294,10 +294,10 @@ QwtPointArrayData::QwtPointArrayData( const double *x,
         const double *y, size_t size )
 {
     d_x.resize( size );
-    qMemCopy( d_x.data(), x, size * sizeof( double ) );
+    memcpy( d_x.data(), x, size * sizeof( double ) );
 
     d_y.resize( size );
-    qMemCopy( d_y.data(), y, size * sizeof( double ) );
+    memcpy( d_y.data(), y, size * sizeof( double ) );
 }
 
 /*!

+ 2 - 0
starpu-top/qwt/qwt_slider.cpp

@@ -333,7 +333,9 @@ void QwtSlider::scaleChange()
 //! Notify change in font
 void QwtSlider::fontChange( const QFont &f )
 {
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QwtAbstractSlider::fontChange( f );
+#endif
     layoutSlider();
 }
 

+ 2 - 0
starpu-top/qwt/qwt_thermo.cpp

@@ -428,7 +428,9 @@ QwtThermo::ScalePos QwtThermo::scalePosition() const
 //! Notify a font change.
 void QwtThermo::fontChange( const QFont &f )
 {
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QWidget::fontChange( f );
+#endif
     layoutThermo();
 }