qt3toqt4
$ qt3to4 lib.pro
1.
QuotePlugin.cpp: In member function ‘QString QuotePlugin::createDirectory(QString)’:
QuotePlugin.cpp:90:30: error: no matching function for call to ‘QDir::exists(QString&, bool)’
QString QuotePlugin::createDirectory (QString d)
{
QString path = dataPath;
path.append("/");
path.append(d);
QDir dir(path);
//if (! dir.exists(path, TRUE))
if (! dir.exists(path))
{
if (! dir.mkdir(path, TRUE))
return QString::null;
}
return path;
}
http://doc.trolltech.com/4.4/porting4.html#qdir
In Qt 3, if acceptAbsPath is true, a file name starting with '/' is be returned without change; if acceptAbsPath is false, an absolute path is prepended to the file name. For example:
In Qt 4, this parameter is no longer available.
2.
PlotLine.cpp: In member function ‘QColor PlotLine::getColorBar(int)’:
PlotLine.cpp:194:21: error: could not convert ‘QString::null’ from ‘const QString::Null’ to ‘QColor’
QColor PlotLine::getColorBar (int d)
{
if (d >= (int) colorBars.count())
//return QString::null;
return QColor();
QColor *color = colorBars.at(d);
return QColor(color->red(), color->green(), color->blue());
}
3.
ColorButton.cpp: In constructor ‘ColorButton::ColorButton(QWidget*, QColor)’:
ColorButton.cpp:32:17: error: ‘SingleShot’ was not declared in this scope
ColorButton.cpp:32:27: error: ‘setToggleType’ was not declared in this scope
http://developer.qt.nokia.com/doc/qt-4.8/porting4.html
Remarks:
In Qt 3, QButton had a "toggle type", which could be QButton::SingleShot, QButton::Toggle, or QButton::Tristate. The new QAbstractButton class doesn't support "tristate" directly; this feature is implemented in QCheckBox instead. The two other "toggle types" (QButton::SingleShot and QButton::Toggle) are replaced by a QAbstractButton::checkable property.
In Qt 3, QButton had a "toggle state", which could be QButton::Off, QButton::NoChange, or QButton::On. In Qt 4, this mechanism has been moved to QCheckBox.
4.
In file included from Toolbar.cpp:22:0:
Toolbar.h:38:37: error: conflicting declaration ‘int w’
Toolbar.h:38:23: error: ‘w’ has a previous declaration as ‘QWidget* w’
Toolbar.cpp:30:1: error: prototype for ‘Toolbar::Toolbar(QWidget*, int, int)’ does not match any in class ‘Toolbar’
Toolbar.h:35:7: error: candidates are: Toolbar::Toolbar(const Toolbar&)
Toolbar.h:38:5: error: Toolbar::Toolbar(QWidget*, int)
class Toolbar : public Q3Frame
{
public:
//Toolbar (QWidget *w, int h, int w);
Toolbar (QWidget *w, int h, int wi);
~Toolbar ();
void addButton (QString name, QPixmap pix, QString tt);
QPushButton * getButton (QString name);
void setButtonStatus (QString name, bool d);
private:
QPushButton *cancelButton;
Q3Dict<QPushButton> list;
int height;
int width;
Q3GridLayout *grid;
};
5.
Config.cpp: In member function ‘void Config::setup()’:
Config.cpp:51:30: error: no matching function for call to ‘QDir::exists(QString&, bool)’
Config.cpp:51:30: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
Config.cpp:60:27: error: no matching function for call to ‘QDir::exists(QString&, bool)’
Config.cpp:60:27: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
Config.cpp:69:27: error: no matching function for call to ‘QDir::exists(QString&, bool)’
Config.cpp:69:27: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
Config.cpp:78:27: error: no matching function for call to ‘QDir::exists(QString&, bool)’
Config.cpp:78:27: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
Config.cpp:87:27: error: no matching function for call to ‘QDir::exists(QString&, bool)’
Config.cpp:87:27: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
Config.cpp:96:27: error: no matching function for call to ‘QDir::exists(QString&, bool)’
Config.cpp:96:27: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
Config.cpp:105:27: error: no matching function for call to ‘QDir::exists(QString&, bool)’
Config.cpp:105:27: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
$ qt3to4 src.pro
1.
QT3:
QAction ( QObject * parent, const char * name )
QAction ( const QString & text, const QKeySequence & shortcut, QObject * parent, const char * name )
QAction ( const QIcon & icon, const QString & text, const QKeySequence & shortcut, QObject * parent, const char * name )
QT4:
QAction ( QObject * parent )
QAction ( const QString & text, QObject * parent )
QAction ( const QIcon & icon, const QString & text, QObject * parent )
Qtstalker.cpp: In member function ‘void QtstalkerApp::initActions()’:
Qtstalker.cpp:283:83: error: no matching function for call to ‘QAction::QAction(QString, QPixmap&, QString, unsigned int, QtstalkerApp* const)’
Qtstalker.cpp:283:83: note: candidates are:
/usr/include/qt4/QtGui/qaction.h:236:5: note: QAction::QAction(const QAction&)
/usr/include/qt4/QtGui/qaction.h:236:5: note: candidate expects 1 argument, 5 provided
/usr/include/qt4/QtGui/qaction.h:212:5: note: QAction::QAction(QActionPrivate&, QObject*)
/usr/include/qt4/QtGui/qaction.h:212:5: note: candidate expects 2 arguments, 5 provided
/usr/include/qt4/QtGui/qaction.h:109:29: note: QAction::QAction(const QIcon&, const QString&, const QKeySequence&, QObject*, const char*)
/usr/include/qt4/QtGui/qaction.h:109:29: note: no known conversion for argument 1 from ‘QString’ to ‘const QIcon&’
/usr/include/qt4/QtGui/qaction.h:107:29: note: QAction::QAction(const QString&, const QKeySequence&, QObject*, const char*)
/usr/include/qt4/QtGui/qaction.h:107:29: note: candidate expects 4 arguments, 5 provided
/usr/include/qt4/QtGui/qaction.h:106:29: note: QAction::QAction(QObject*, const char*)
/usr/include/qt4/QtGui/qaction.h:106:29: note: candidate expects 2 arguments, 5 provided
/usr/include/qt4/QtGui/qaction.h:103:5: note: QAction::QAction(const QIcon&, const QString&, QObject*)
/usr/include/qt4/QtGui/qaction.h:103:5: note: candidate expects 3 arguments, 5 provided
/usr/include/qt4/QtGui/qaction.h:102:5: note: QAction::QAction(const QString&, QObject*)
/usr/include/qt4/QtGui/qaction.h:102:5: note: candidate expects 2 arguments, 5 provided
/usr/include/qt4/QtGui/qaction.h:101:14: note: QAction::QAction(QObject*)
/usr/include/qt4/QtGui/qaction.h:101:14: note: candidate expects 1 argument, 5 provided
2.
Plot.cpp: In member function ‘virtual void Plot::mouseMoveEvent(QMouseEvent*)’:
Plot.cpp:507:15: error: ‘class QPainter’ has no member named ‘setRasterOp’
Plot.cpp:507:27: error: ‘XorROP’ is not a member of ‘Qt’
#if QT_VERSION < 0x40000 setRasterOp (rootContext.fROp); #else /* QT_VERSION */ // if (device()->devType() != QInternal::Widget ) if (pd->devType() == QInternal::Image ) setCompositionMode(rootContext.fROp); #endif /* QT_VERSION */
// painter.setRasterOp(Qt::XorROP);
painter.setCompositionMode(QPainter::CompositionMode_Xor);
3.
ChartPage.cpp:99:31: error: no matching function for call to ‘QDir::remove(QString&, bool)’
ChartPage.cpp:99:31: note: candidate is:
4.
GroupPage.cpp:94:25: error: no matching function for call to ‘QDir::exists(QString&, bool)’
GroupPage.cpp:94:25: note: candidates are:
/usr/include/qt4/QtCore/qdir.h:184:10: note: bool QDir::exists() const
/usr/include/qt4/QtCore/qdir.h:184:10: note: candidate expects 0 arguments, 2 provided
/usr/include/qt4/QtCore/qdir.h:198:10: note: bool QDir::exists(const QString&) const
/usr/include/qt4/QtCore/qdir.h:198:10: note: candidate expects 1 argument, 2 provided
GroupPage.cpp: In member function ‘void GroupPage::deleteGroupItem()’:
GroupPage.cpp:176:37: error: no matching function for call to ‘QDir::remove(QString&, bool)’
GroupPage.cpp: In member function ‘void GroupPage::renameGroup()’:
GroupPage.cpp:240:41: error: no matching function for call to ‘QDir::rename(QString, QString&, bool)’
5.
PortfolioPage.cpp: In member function ‘void PortfolioPage::newPortfolio()’:
PortfolioPage.cpp:89:27: error: no matching function for call to ‘QDir::exists(QString&, bool)’
6.
PortfolioPage.cpp: In member function ‘void PortfolioPage::deletePortfolio()’:
PortfolioPage.cpp:137:31: error: no matching function for call to ‘QDir::remove(QString&, bool)’
7.
TestPage.cpp: In member function ‘void TestPage::newTest()’:
TestPage.cpp:89:25: error: no matching function for call to ‘QDir::exists(QString&, bool)’
TestPage.cpp: In member function ‘void TestPage::renameTest()’:
TestPage.cpp:181:25: error: no matching function for call to ‘QDir::exists(QString&, bool)’
TestPage.cpp:181:25: note: candidates are:
TestPage.cpp:190:25: error: no matching function for call to ‘QDir::rename(QString&, QString&, bool)’
TestPage.cpp:190:25: note: candidate is: