Hey folks, this warning pops up all the time, and I don’t think it’s my fault. I wrote an empty program just to make sure the warning still popped up, and it did.
Here’s my empty program, check it for errors (I don’t think there are any):
what.h:
#include <QtGui>
class Whatever: public QWidget
{
Q_OBJECT
public:
Whatever(QWidget *parent=0);
~Whatever();
private slots:
private:
};
what.cpp:
#include "what.h"
Whatever::Whatever(QWidget *parent):QWidget(parent){};
Whatever::~Whatever(){};
int main(int argv, char **args){
QApplication sup(argv,args);
return sup.exec();
}
Here’s the warning:
/usr/bin/clang++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.8 -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I. -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib -o moc_what.o moc_what.cpp
In file included from moc_what.cpp:10:
In file included from ./what.h:1:
In file included from /opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers/QtGui:54:
In file included from /opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers/qplaintextedit.h:52:
In file included from /opt/local/include/QtGui/qabstracttextdocumentlayout.h:46:
In file included from /opt/local/include/QtGui/qtextlayout.h:50:
In file included from /opt/local/include/QtGui/qevent.h:52:
/opt/local/include/QtGui/qmime.h:119:10: warning: private field 'type' is not
used [-Wunused-private-field]
char type;
^
↧