Menu

o match for call to `(QFont) ()'

Help
2005-02-07
2013-03-09
  • Tim Middleton

    Tim Middleton - 2005-02-07

    I find that xca compiling is now broken on my FreeBSD 5.3 box. It's been a while since i've played with it, so i'm not sure what broke it (it used to work fine). QT is version 3.3.3. Can anyone more familiar with QT spot what the problem might be (looks like it may be the QT version)?

    gcc -I. -I.. -I/usr/local/include/db4 -I/usr/X11R6/include -Wall -DPREFIX=\"/usr/local\" -DETC=\"/etc/xca\"  -c clicklabel.cpp -o clicklabel.o
    clicklabel.cpp: In constructor `ClickLabel::ClickLabel(QWidget*, const char*, uint)':
    clicklabel.cpp:61: error: no match for call to `(QFont) ()'
    gmake[1]: *** [clicklabel.o] Error 1
    gmake[1]: Leaving directory `/tmp/usr/ports/security/xca/work/xca-0.5.1/widgets'
    gmake: *** [widgets/target.obj] Error 2

     
    • Christian Hohnstaedt

      Yes, this is because gcc 3.4 is more picky about
      this construct.....
      Here is a patch:
      (changes the variable-name "font" to "fnt")
      Hope this pasted patch will work.....
      (No possibility to add files to a thread....)

      ** widgets/clicklabel.cpp.orig Wed Nov 26 22:03:18 2003
      --- widgets/clicklabel.cpp      Thu Jan 27 10:29:42 2005
      ***************
      *** 58,66 ****
        ClickLabel::ClickLabel( QWidget* parent,  const char* name, WFlags f )
              :QLabel( parent, name, f )
        {
      !       QFont font( font() );
      !       font.setBold(true);
      !       setFont( font );
              setFrameShape( QLabel::Panel );
              setFrameShadow( QLabel::Sunken );
              setAlignment( int( QLabel::AlignCenter ) );
      --- 58,66 ----
        ClickLabel::ClickLabel( QWidget* parent,  const char* name, WFlags f )
              :QLabel( parent, name, f )
        {
      !       QFont fnt( font() );
      !       fnt.setBold(true);
      !       setFont( fnt );
              setFrameShape( QLabel::Panel );
              setFrameShadow( QLabel::Sunken );
              setAlignment( int( QLabel::AlignCenter ) );

       
    • Tim Middleton

      Tim Middleton - 2005-02-09

      While the diff formatting was mangled a bit by the forum, I could see what you were doing... and it worked. Thanks.