g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DEDITORPLUGIN -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I../../../../qt-44/mkspecs/linux-g++ -I. -I../../../../qt-44/include/QtDesigner -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtScript -I../../../../qt-44/include/QtScript -I../../../../qt-44/include -I../src -I../src/StyleDialog -Irelease -Irelease -o release/textedit.o ../src/textedit.cpp
In file included from ../src/textedit.h:28,
from ../src/textedit.cpp:22:
../src/userblockdata.h: In constructor ‘QBlockData::QBlockData()’:
../src/userblockdata.h:58: warning: ‘QBlockData::collapsedBlock’ will be initialized after
../src/userblockdata.h:55: warning: ‘bool QBlockData::marked’
../src/userblockdata.h:43: warning: when initialized here
../src/textedit.cpp: In member function ‘virtual void TextEdit::paintEvent(QPaintEvent*)’:
../src/textedit.cpp:83: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:87: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:91: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:95: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:99: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:103: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp: At global scope:
../src/textedit.cpp:109: warning: unused parameter ‘end’
make[1]: *** [release/textedit.o] Error 1
make[1]: Leaving directory `/home/elcuco/src/qeditor/qPEditor/qPEditorPlugin'
make: *** [sub-qPEditorPlugin-make_default] Error 2
[elcuco@localhost qPEditor]$
g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DEDITORPLUGIN -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I../../../../qt-44/mkspecs/linux-g++ -I. -I../../../../qt-44/include/QtDesigner -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtScript -I../../../../qt-44/include/QtScript -I../../../../qt-44/include -I../src -I../src/StyleDialog -Irelease -Irelease -o release/textedit.o ../src/textedit.cpp
In file included from ../src/textedit.h:28,
from ../src/textedit.cpp:22:
../src/userblockdata.h: In constructor ‘QBlockData::QBlockData()’:
../src/userblockdata.h:58: warning: ‘QBlockData::collapsedBlock’ will be initialized after
../src/userblockdata.h:55: warning: ‘bool QBlockData::marked’
../src/userblockdata.h:43: warning: when initialized here
../src/textedit.cpp: In member function ‘virtual void TextEdit::paintEvent(QPaintEvent*)’:
../src/textedit.cpp:83: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:87: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:91: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:95: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:99: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp:103: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
../src/textedit.cpp: At global scope:
../src/textedit.cpp:109: warning: unused parameter ‘end’
make[1]: *** [release/textedit.o] Error 1
make[1]: Leaving directory `/home/elcuco/src/qeditor/qPEditor/qPEditorPlugin'
make: *** [sub-qPEditorPlugin-make_default] Error 2
[elcuco@localhost qPEditor]$
To copy to clipboard, switch view to plain text mode
You are passing a QChar() to a function which needs a reference. The workaround is simple:
if ( CurrentLineVisible && CurrentLineColor.isValid() )
{
...
switch ( cc )
{
case '{':
if ( !exists( pos )) break;
paintBracketForward
( cur, pos , c1
=QChar( '{' ), c2
=QChar( '}' ) );
break;
if ( CurrentLineVisible && CurrentLineColor.isValid() )
{
QChar c1 = '{';
QChar c2 = '}';
...
switch ( cc )
{
case '{':
if ( !exists( pos )) break;
paintBracketForward( cur, pos , c1=QChar( '{' ), c2=QChar( '}' ) );
break;
To copy to clipboard, switch view to plain text mode
statements in all the cases. Now it compiles and works.
Bookmarks