Giter VIP home page Giter VIP logo

qtscriptgenerator's People

Watchers

 avatar

qtscriptgenerator's Issues

compile error

What steps will reproduce the problem?
1. cd qtbindings
2. qmake qtbindings.pro
3. nmake

What is the expected output? What do you see instead?
No error, but I got:

qtscriptshell_QAbstractItemModel.cpp
..\..\generated_cpp\com_trolltech_qt_core\qtscriptshell_QAbstractItemModel.cpp(1
29) : error C2440: 'default argument' : cannot convert from 'T *' to
'QVariant *
'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-
style cast or function-style cast
..\..\generated_cpp\com_trolltech_qt_core\qtscriptshell_QAbstractItemModel.cpp(2
34) : error C2440: 'default argument' : cannot convert from 'T *' to
'QVariant *
'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-
style cast or function-style cast
qtscriptshell_QAbstractListModel.cpp
..\..\generated_cpp\com_trolltech_qt_core\qtscriptshell_QAbstractListModel.cpp(1
17) : error C2440: 'default argument' : cannot convert from 'T *' to
'QVariant *
'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-
style cast or function-style cast
..\..\generated_cpp\com_trolltech_qt_core\qtscriptshell_QAbstractListModel.cpp(2
08) : error C2440: 'default argument' : cannot convert from 'T *' to
'QVariant *
'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-
style cast or function-style cast
qtscriptshell_QAbstractTableModel.cpp
..\..\generated_cpp\com_trolltech_qt_core\qtscriptshell_QAbstractTableModel.cpp(
131) : error C2440: 'default argument' : cannot convert from 'T *' to 'QVariant
*'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-
style cast or function-style cast
..\..\generated_cpp\com_trolltech_qt_core\qtscriptshell_QAbstractTableModel.cpp(
222) : error C2440: 'default argument' : cannot convert from 'T *' to 'QVariant
*'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-
style cast or function-style cast
qtscriptshell_QBuffer.cpp
Generating Code...
Compiling...


What version of the product are you using? On what operating system?
latest snapshot from Wed, 4 Feb 2009 10:26:28 with
qt-win-opensource-src-4.5.0-beta1

Please provide any additional information below.

I also can not create a SLN file from qtbindings.pro
when I type "qmake -tp vc qtbindings.pro"

I got:
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_core\qtscript_core.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_gui\qtscript_gui.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_network\qtscript_network.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_opengl\qtscript_opengl.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_sql\qtscript_sql.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_svg\qtscript_svg.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_xml\qtscript_xml.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_phonon\qtscript_phonon.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_webkit\qtscript_webkit.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_xmlpatterns\qtscript_xmlpatterns.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qtscript_uitools\qtscript_uitools.vcproj'
WARNING: Ignored (not found) 'C:/QtScript/ScriptGenerator/qtscriptgenerat
or/qtbindings/qs_eval\qs_eval.vcproj'

Original issue reported on code.google.com by [email protected] on 5 Feb 2009 at 10:57

Protected class members are not accessible to subclasses

I encountered this problem when trying to reimplement an event handler in a
class derived from QWidget and to call the base class implementation in it.
But event handler functions are not accessible, or any other protected
member functions. There should be some way for subclasses to call those
functions. 

What steps will reproduce the problem?

Here is a simple example which doesn't make much sense, but should still be
runnable (assumming that bindings would have all the methods from Qt classes). 

Run the following code with qs_eval : 

function A()
{
    QWidget.call(this);

    // test calling any protected method of QWidget
    this.resetInputContext();
}

A.prototype = new QWidget();

a = new A();


What is the expected output? What do you see instead?

Uncaught exception at ...: ReferenceError: resetInputContext is not defined

What version of the product are you using? On what operating system?
Qt 4.5.0-snapshot-20090127, Qt script generator commit
940bf9c93ef10aa3303245474f1698ce0cade941, Ubuntu Linux. 


Original issue reported on code.google.com by [email protected] on 6 Feb 2009 at 3:58

compile/emerge failed with gcc4.3 amd64

What steps will reproduce the problem?
1. try to compile qtscriptgenerator
2. failed
3. -

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
0.1.0

Please provide any additional information below.
http://bugs.gentoo.org/show_bug.cgi?id=274458.


Original issue reported on code.google.com by [email protected] on 26 Jun 2009 at 2:12

Attachments:

QUrl constructor aborts

u = new QUrl("http://www.google.com")
and
u = new QUrl();

Crashes the application with:
ASSERT: "false" in file
/home/ian/work/amarok.git/build/src/scriptengine/generator/generator/generated_c
pp/com_trolltech_qt_core/qtscript_QUrl.cpp,
line 1073

Original issue reported on code.google.com by [email protected] on 28 Jul 2008 at 4:44

possible memory leak in Handler::startElement in typesystem.cpp

What steps will reproduce the problem?
1. Call Handler::startElement() such that it can return false
2. ...
3. Leaks!

What version of the product are you using? On what operating system?
The code that is checked into the Amarok 2.0 tree. Linux (Kubuntu 8.04 +
backports)


Please provide any additional information below.

At line 428 in typesystem.cpp, the variable element is assigned some
allocated memory. If everything goes OK, that memory gets assigned to
current and there is no leak. If anything goes wrong that memory is never
assigned to current and is leaked when the member function returns false to
the caller.

The attached patch uses an std::auto_ptr to control element until it
releases it to the current assignment.


Original issue reported on code.google.com by [email protected] on 14 Oct 2008 at 8:30

Attachments:

Always include all the includes, since they are required anyways

QtScript Generator actually requires Webkit, Phonon and QtXmlPatterns
because of qtbindings/qtbindingsbase.pri. 

So the easy fix is to just always require it, since most distros have the
Qt defines that say Webkit and Phonon doesn't exist even though they do.
Thats what the patch does.

I had to use the lowercase phonon includes since KDE's phonon doesn't have
an equivalent to phonon/phonon.

Original issue reported on code.google.com by [email protected] on 20 Mar 2009 at 2:06

Unable to pass script values as QVariant to C++

What steps will reproduce the problem?

I have a QScriptable class that has a slot that looks like this:

void sendToDestination( uint destType, const QString &dest, uint msgType,
const QVariant &msg );

I am using QVariant as the last parameter to allow me to pass a string or
an Object from the script.

What is the expected output? What do you see instead?

I expect to get either a QVariant::String or QVariant::Map in the C++ code.
When I call it with a string, the result is as expected. However, when I
call it with an object like this:

var mapMsg = new Object;
mapMsg.k1 = "v1";
mapMsg.k2 = "v2";
mapMsg.k3 = "v3";

ems.sendToDestination( ems.TIBEMS_TOPIC, topic, ems.TIBEMS_MAP_MESSAGE,
mapMsg )

I get the value as QVariant::String in the C++ code, instead of
QVariant::Map. The value of this string is "[object Object]". Looks like
QtScript is calling the toString() method on the Object and always creating
a QVariant( QString ) instead of creating a QVariant( QVariantMap ) as I
expect it to.

What version of the product are you using? On what operating system?

Qt-4.5.0 on SLES9, built from source.


Please provide any additional information below.


Original issue reported on code.google.com by nhasan%[email protected] on 7 Apr 2009 at 5:14

QTcpSocket.connectToHost doesn't work

The follow code results in a "function not found match". 
var host = new QHostAddress("localhost");
var sock = new QTcpSocket();
var port = 25;
sock.connectToHost(host, port, QIODevice.ReadWrite);

It appears that its expecting a quint16, and fails when it doesn't receive one?

Original issue reported on code.google.com by [email protected] on 29 Jan 2009 at 2:39

Doesn't work with Qt 4.5 snapshots

What steps will reproduce the problem?
1. Try using the script generator with a Qt 4.5 snapshot

What is the expected output? What do you see instead?
Expected: It works
What I see instead:

g++ -c -pipe -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -fweb 
-frename-registers -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_SCRIPT_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. 
-I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtCore 
-I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtGui 
-I/usr/lib/qt4/include/QtScript -I/usr/lib/qt4/include/QtScript 
-I/usr/lib/qt4/include -I. -Irelease -I. -o 
release/qtscriptshell_QFutureIterator.o 
../../generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureIterator.cpp
../../generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureIterator.cpp: 
In 
constructor 'QtScriptShell_QFutureIterator::QtScriptShell_QFutureIterator()':
../../generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureIterator.cpp:10: 
error: no matching function for call 
to 'QFutureIterator<QScriptValue>::QFutureIterator()'
/usr/lib/qt4/include/QtCore/qfuture.h:193: note: candidates are: 
QFutureIterator<T>::QFutureIterator(const QFuture<T>&) [with T = 
QScriptValue]
/usr/lib/qt4/include/QtCore/qfuture.h:193: note:                 
QFutureIterator<QScriptValue>::QFutureIterator(const 
QFutureIterator<QScriptValue>&)
make[2]: *** [release/qtscriptshell_QFutureIterator.o] Error 1


What version of the product are you using? On what operating system?
Current svn of the script generator with yesterday's qt 4.5 snapshot

Original issue reported on code.google.com by bero%[email protected] on 21 Aug 2008 at 8:23

Unhide function parameters w/in the functions

C/C++ will gladly let you hide function parameters w/in the scope of the
function. And there are a few places where that happens. Hiding is not
considered a defect but if you wanted to access that parameter in some
scope then it might not be apparent that you are getting the variable you
want if it has been hidden.

Original issue reported on code.google.com by [email protected] on 23 Nov 2008 at 7:22

Attachments:

qtscriptshell_QFutureIterator.cpp fails to compile.

What steps will reproduce the problem?
1. Got source from git
2. Tried to compile it

What is the expected output? What do you see instead?

It should compile fine, instead I got:

x86_64-pc-linux-gnu-g++ -c -pipe -march=core2 -msse4.1 -O2 -pipe -fomit-
frame-pointer -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_SCRIPT_LIB -
DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -
I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/
QtScript -I/usr/include/qt4 -I. -Irelease -I. -o release/
qtscriptshell_QFutureIterator.o ../../generated_cpp/com_trolltech_qt_core/
qtscriptshell_QFutureIterator.cpp                                               

../../generated_cpp/com_trolltech_qt_core/
qtscriptshell_QFutureIterator.cpp: In constructor 
‘QtScriptShell_QFutureIterator::QtScriptShell_QFutureIterator
()’:                                                                          

../../generated_cpp/com_trolltech_qt_core/
qtscriptshell_QFutureIterator.cpp:10: error: no matching function for call 
to ‘QFutureIterator<QScriptValue>::QFutureIterator
()’                                                                           

/usr/include/qt4/QtCore/qfuture.h:191: note: candidates are: 
QFutureIterator<T>::QFutureIterator(const QFuture<T>&) [with T = 
QScriptValue]                                                                   

/usr/include/qt4/QtCore/qfuture.h:191: note:                 
QFutureIterator<QScriptValue>::QFutureIterator(const 
QFutureIterator<QScriptValue>&)                                                 

make[2]: *** [release/qtscriptshell_QFutureIterator.o] Błąd 1
make[2]: Opuszczenie katalogu `/var/tmp/portage/x11-libs/
qtscriptgenerator-9999/work/qtscriptgenerator-9999/qtbindings/
qtscript_core'
make[1]: *** [release] Błąd 2
make[1]: Opuszczenie katalogu `/var/tmp/portage/x11-libs/
qtscriptgenerator-9999/work/qtscriptgenerator-9999/qtbindings/
qtscript_core'
make: *** [sub-qtscript_core-make_default] Błąd 2

What version of the product are you using? On what operating system?

Latest git, gentoo, qt 4.5 final


Original issue reported on code.google.com by Mieszkoslusarczyk on 9 Mar 2009 at 11:30

Attachments:

QHttpHeader missing

QHttpHeader seems to have been missed, which means that
QHttpResponseHeader doesn't have functions like .setContentType() or
.addValue().

http://amarok.kde.org/qtscriptbindings/qhttpresponseheader.html
vs.
http://doc.trolltech.com/4.4/qhttprequestheader-members.html

Original issue reported on code.google.com by [email protected] on 28 Jul 2008 at 4:48

QSqlQuery.bindValue() cannot find a matching overload?

Hi!

No matter what i try, i cannot get QSqlQuery.bindValue() to pick a usable
overload. e.g.

q = new QSqlQuery(db);
q.param = new QSql.ParamType(QSql.In);
q.prepare("insert into tbl values(?,?,?);");
q.bindValue(0, 7, q.param );
...

The bindValue() calls gives me:

Error: QFile::bindValue(): could not find a function match; candidates are:
bindValue(String placeholder, Object val, ParamType type)
bindValue(int pos, Object val, ParamType type)


(the fact that it says QFile instead of QSqlQuery is a separate bug: #11)

i've tried:

bindValue( pos, new Number(7), q.param )
bindValue( ':key', new Number(7), q.param )

etc., but it cannot seem to pick up the proper overload.

i can, however, use addBindValue():

q.addBindValue( myValue, q.param );

:-?

Original issue reported on code.google.com by [email protected] on 14 Sep 2008 at 10:23

pointer validity checks in abstractmetabuilder.cpp

abstractmetabuilder.cpp has a few places were pointers are not properly
checked.

1. The enum iterator in AbstractMetaBuilder::figureOutEnumValuesForClass is
checked for validity and a report is issued. But then it is dereferenced in
the very next line. The foreach should continue instead.

2. AbstractMetaBuilder::translateType uses the boolean parameter ok, but
when it checks to see if the value is false it incorrectly checks the pointer.

3. AbstractMetaBuilder::translateDefaultValue might have an invalid pointer
type and checks in someplaces, but doesn't in others. It should check
everywhere.

Original issue reported on code.google.com by [email protected] on 23 Nov 2008 at 7:14

Attachments:

QTcpServer.listen doesn't work if given options

new QTcpServer().listen() always returns true.
new QTcpServer().listen( QHostAddress.Any ) always returns false.

However, given that QHostAddress.Any is the default, they should have
exactly the same behavior.

Original issue reported on code.google.com by [email protected] on 30 Jul 2008 at 2:46

Can't set QSqlQueryModel to QComboBox.

1) I add my QComboBox to globalObject from C++;
2) Create new QSqlQueryModel in QtScript file;
3) Try to myComboBox.setModel(myModel);
4) Have warning in output console "QComboBox::setModel" cant't set 0 model 

Original issue reported on code.google.com by [email protected] on 14 Nov 2008 at 1:59

Failure to find: ../../generated_cpp/com_trolltech_qt_phonon/main.cpp

What steps will reproduce the problem?
1. Read README and follow the steps
2. Use Suse 10.3
3. gcc -v
cmd started at: 080728 10:53:16
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.2.1
--enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64
--with-system-zlib --enable-shared --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--program-suffix=-4.2 --enable-version-specific-runtime-libs
--without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux
Thread model: posix
gcc version 4.2.1 (SUSE Linux)

I pulled the svn on 080725

What is the expected output? What do you see instead?
no compile errors

What version of the product are you using? On what operating system?
see above

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 28 Jul 2008 at 5:54

compile error

What steps will reproduce the problem?
1. cd qtbindings  
2. qmake
3. make

this will result in:

g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_SCRIPT_LIB -DQT_GUI_LIB 
-DQT_CORE_LIB -DQT_SHARED -I../../../../qt-copy/mkspecs/linux-g++ -I. 
-I../../../../qt-copy/include/QtCore -I../../../../qt-copy/include/QtCore 
-I../../../../qt-copy/include/QtGui -I../../../../qt-copy/include/QtGui 
-I../../../../qt-copy/include/QtScript -I../../../../qt-copy/include/QtScript 
-I../../../../qt-copy/include -I. -Idebug -I. -o 
debug/qtscriptshell_QFutureIterator.o 
../../generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureIterator.cpp
../../generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureIterator.cpp: 
In 
constructor 
‘QtScriptShell_QFutureIterator::QtScriptShell_QFutureIterator()’:
../../generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureIterator.cpp:10: 
error: no matching function for call 
to ‘QFutureIterator<QScriptValue>::QFutureIterator()’
../../../../qt-copy/include/QtCore/../../src/corelib/concurrent/qfuture.h:187: 
note: candidates are: QFutureIterator<T>::QFutureIterator(const 
QFuture<T>&) [with T = QScriptValue]
../../../../qt-copy/include/QtCore/../../src/corelib/concurrent/qfuture.h:187: 
note:                 
QFutureIterator<QScriptValue>::QFutureIterator(const 
QFutureIterator<QScriptValue>&)
make[2]: *** [debug/qtscriptshell_QFutureIterator.o] Error 1
make[2]: Leaving directory 
`/home/tz/develop/kde/svn/dojo/qtscriptgenerator/qtbindings/qtscript_core'


What is the expected output? What do you see instead?

There should be no compile error

What version of the product are you using? On what operating system?

I use the latest git checkout togther wit qt 4.4.3. The problem also 
happens with the latest svn checkout.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Nov 2008 at 4:39

QUdpSocket problem

Server(netcat): nc -l -p 3333 -u  -n -vv

This C++ program works as expected:
#include <QCoreApplication>
#include <QHostAddress>
#include <QUdpSocket>

int main(int argc, char** argv)
{
  QCoreApplication app(argc, argv);

  QHostAddress host("127.0.0.1");
  QUdpSocket sock;

  QByteArray arr("hello");
  sock.writeDatagram(arr, host, 3333);

  return 0;
}

Output:
listening on [any] 3333 ...
connect to [127.0.0.1] from (UNKNOWN) [127.0.0.1] 3689
hello
 sent 1, rcvd 5

Same script didn't work(qs_eval script.js):
try
{
  var host = new QHostAddress("127.0.0.1");
  var sock = new QUdpSocket();

  var arr = new QByteArray("hello");
  sock.writeDatagram(arr, host, 3333);

}
catch(error)
{
  print("catch error: " + error.message + "\n");
}

Output:
vv
listening on [any] 3333 ...
connect to [127.0.0.1] from (UNKNOWN) [127.0.0.1] 3787
 sent 0, rcvd 0

Qt-4.4.0, qtscriptgenerator-<last revision :)>


Original issue reported on code.google.com by [email protected] on 14 Aug 2008 at 8:01

Attachments:

LD in x11-libs/qtscriptgenerator-0.1.0 fails

I am using a hardened gcc-3.4 with "--fforce-addr" and I cannot emerge
qtscriptgenerator-0.1.0.

i686-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--enable-new-dtags
-Wl,--hash-style=both -Wl,--sort-common -o generator ast.o lexer.o list.o
parser.o smallobject.o control.o visitor.o default_visitor.o dumptree.o
tokens.o binder.o codemodel.o type_compiler.o name_compiler.o
declarator_compiler.o class_compiler.o codemodel_finder.o compiler_utils.o
preprocessor.o generator.o main.o reporthandler.o typeparser.o typesystem.o
asttoxml.o fileout.o generatorset.o metajava.o customtypes.o
abstractmetabuilder.o abstractmetalang.o prigenerator.o 
generatorsetqtscript.o
metaqtscriptbuilder.o metaqtscript.o classgenerator.o shellgenerator.o
shellimplgenerator.o shellheadergenerator.o setupgenerator.o docgenerator.o
moc_generator.o moc_fileout.o moc_generatorset.o moc_prigenerator.o
moc_generatorsetqtscript.o moc_classgenerator.o moc_shellgenerator.o
moc_shellimplgenerator.o moc_shellheadergenerator.o moc_setupgenerator.o
qrc_generator.o    -L/usr/lib/qt4 -lQtXml -L/usr/lib/qt4 -pthread -pthread
-lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
`.L1135' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1138' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1147' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1137' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1143' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1145' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1251' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1254' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1263' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1253' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1259' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
`.L1261' referenced in section
`.gnu.linkonce.r._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o: defined in discarded section
`.gnu.linkonce.t._ZN3rpp17pp_macro_expander23skip_argument_variadicsIPKcEET
_RKSt6vectorISsSaISsEEPNS_8pp_macroES4_S4_'
of main.o
collect2: ld returned 1 exit status
make: *** [generator] Error 1
 *
 * ERROR: x11-libs/qtscriptgenerator-0.1.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2787:  Called die
 * The specific snippet of code:
 *       emake || die "make generator failed";
 *  The die message:
 *   make generator failed
 *
 * If you need support, post the topmost build error, and the call stack if
relevant.
 * The ebuild environment file is located at
'/var/tmp/portage/x11-libs/qtscriptgenerator-0.1.0/temp/environment'.
 *
>>> Failed to emerge x11-libs/qtscriptgenerator-0.1.0


Portage 2.1.6.13 (selinux/2007.0/x86/hardened, gcc-3.4.6,
glibc-2.9_p20081201-r2, 2.6.29-hardened_b5 i686)
=================================================================
System uname:
Linux-2.6.29-hardened_b5-i686-Genuine_Intel-R-_CPU_T2050_@_1.60GHz-with-
gentoo-1.12.12
Timestamp of tree: Tue, 16 Jun 2009 02:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.12
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -fforce-addr -fomit-frame-pointer -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d
/etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d
/etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -fforce-addr -fomit-frame-pointer -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="ccache distlocks fixpackages loadpolicy parallel-fetch protect-
owned
sandbox selinux sesandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.kaist.ac.kr/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--enable-new-dtags -Wl,--hash-
style=both
-Wl,--sort-common"
MAKEOPTS="-j3"
USE="X acl acpi alsa bash-completion berkdb branding bzip2 cairo cdr cjk 
cli
cracklib crypt cups custom-cflags custom-cxxflags dbus doc dri dvd dvdr 
dvdread
emboss encode examples expat fam fontconfig fortran gdbm gif git gnutls gpm
gstreamer hal handbook hardened iconv ieee1394 ipv6 isdnlog java java6 jpeg
jpeg2k kde latex ldap libnotify lzo mad midi mikmod mmx mmxext mng mp3 mpeg
mudflap ncurses networkmanager nls nptl nptlonly ogg openexr opengl openmp 
pam
pcre pdf perl pic png policykit ppds pppd pulseaudio python qt qt3support 
qt4
quicktime readline reflection sdl selinux session spell spl sse sse2 ssl
startup-notification svg tcpd tiff truetype unicode usb vim-syntax vorbis
webkit win32codecs x86 xcb xcomposite xml xorg xpm xv zlib" 
ALSA_CARDS="ali5451
als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1        emu10k1x 
ens1370
ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m       maestro3 
trident
usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym 
copy
dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat 
linear
meter mmap_emul mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm
authn_default authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir
disk_cache env expires ext_filter file_cache filter headers include info
log_config logio mem_cache mime mime_magic negotiation rewrite setenvif 
speling
status unique_id userdir usertrack vhost_alias" ELIBC="glibc"
INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb 
ncurses
text"
USERLAND="GNU"
VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 
imstt
intel  mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge 
savage     
siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via 
vmware        
voodoo"

From Gentoo. I just report a Gentoo bug:http://bugs.gentoo.org/274458. And 
QT Herd suggest me to file an issue here.

Original issue reported on code.google.com by [email protected] on 28 Jun 2009 at 6:50

Global enums are silently ignored

It seems that enums in the global namespace (e.g. no namespace or class) are 
silently ignored with no output either in code form or in warnings from the 
generator.

Is it possible to either work around this behaviour could I be guided on 
where I would need to modify in order to fix this.

Original issue reported on code.google.com by [email protected] on 16 Sep 2009 at 1:58

QProgressBar.show causes stack overflows

Import "qt.gui". Now, by calling:
  bar = new QProgressBar;
  bar.show();
you get a recursive chain of calls via QtScriptShell_QProgressBar::text().

Tested on revision 773 of the generator, on Windows.

Original issue reported on code.google.com by [email protected] on 26 Aug 2008 at 12:53

deal with dead code

There are places where code is effectively dead. But the compiler will
still compile this code in. So it should either be removed or fixed if
necessary.

1. add_extra_include_for_type in abstractmetalang.cpp checks the validity
of type at line 1562 but at this point it has to be valid. So checking is
not necessary.

2. In parser.cpp there is an idiom where the boolean isVector is set to
true and then the while loop sets it to true. It should be initialized to
false. Otherwise isVector never changes and the conditionals that check it
later are dead.

3. addRemoveFunctionToTemplates in typesystem.cpp has a big chunk of
assignments that are dead because of the return statement. Rather then
return, just comment out for now so it doesn't bulge the object code.

Original issue reported on code.google.com by [email protected] on 23 Nov 2008 at 7:18

Attachments:

QWidget's sizeHint property value cannot be changed

sizeHint doesn't change when a new value is assigned to it. 

What steps will reproduce the problem?

qs> a = new QWidget()
QWidget
qs> a.sizeHint
QSize(-1, -1) 
qs> a.sizeHint = new QSize(100, 100)
QSize(100, 100) 
qs> a.sizeHint
QSize(-1, -1)

What is the expected output? What do you see instead?

I would expect to be able to change the size hint of my widgets, but it
doesn't seem possible at the moment. 


What version of the product are you using? On what operating system?

Qt 4.5-rc1, Qt Script Generator git commit
15da905b6ebc23c839a78510d8f8e70df11a70a4, Ubuntu Linux.


Original issue reported on code.google.com by [email protected] on 11 Feb 2009 at 11:29

QThreadPool has not been declared in qtscript_QtConcurrent.cpp

What steps will reproduce the problem?
1. cd qtbindings
2. qmake
3. make

Result is:

In file included from
../../generated_cpp/com_trolltech_qt_core/qtscript_QtConcurrent.cpp:10:   


/usr/include/QtCore/qtconcurrentreducekernel.h: In member function ‘bool
QtConcurrent::ReduceKernel<ReduceFunctor, ReduceResultType,
T>::shouldThrottle()’:                                                    

/usr/include/QtCore/qtconcurrentreducekernel.h:214: erreur: ‘QThreadPool’
has not been declared                                                     


/usr/include/QtCore/qtconcurrentreducekernel.h: In member function ‘bool
QtConcurrent::ReduceKernel<ReduceFunctor, ReduceResultType,
T>::shouldStartThread()’:                                                 

/usr/include/QtCore/qtconcurrentreducekernel.h:220: erreur: ‘QThreadPool’
has not been declared                                                     


make[2]: *** [release/qtscript_QtConcurrent.o] Erreur 1  

What is the expected output? What do you see instead?

No compile error

What version of the product are you using? On what operating system?

Latest Git checkout, with Qt 4.5 on Archlinux.

Please provide any additional information below.

A simple workaround is to include QThreadPool in qtscript_QtConcurrent, but
since it's a generated file, i'm not sure it's the best way.

Original issue reported on code.google.com by [email protected] on 24 Mar 2009 at 8:28

Parser bug: template specializations

Currently the parser doesn't parse template specializations
correctly, it requires illegal C++:

    template<>
    void Class<void>::foo(){}

instead of 
    void Class<void>::foo(){}
only.

Here is a patch:
http://lists.kde.org/?l=kde-commits&m=121935024418698&w=2

Maybe the TODO could also be resolved by fixing the lexer.

(cpptoxml is used by the lua binding)




Original issue reported on code.google.com by [email protected] on 21 Aug 2008 at 8:47

Enums as arguments for flags

Currently the bindings will not accept a plain enum value as argument to a
function that expects a flags value (i.e. QIODevice::OpenModeFlag vs
QIODevice::OpenMode). Since it's relatively common to pass just a single
enum value, it would be nice if the bindings layer automatically converted
the enum value to a flags value.

Original issue reported on code.google.com by [email protected] on 2 Feb 2009 at 1:22

QByteArray: Bindings for data() and constData() is not generated

What steps will reproduce the problem?
Bindings for data() and constData() is not generated for QByteArray class.
This makes it impossible to access the content of the QByteArray object as
a string from scripts. As a result, I cannot also use QFile from scripts as
it returns QByteArray.

What is the expected output? What do you see instead?
A way to access the contents of QByteArray as a string from scripts.

What version of the product are you using? On what operating system?
Qt 4.5 with latest generator git snapshot

Please provide any additional information below.


Original issue reported on code.google.com by nhasan%[email protected] on 31 Mar 2009 at 4:36

A single void parameter should be ignore

For a method with the following signature:
int getNumber(void) 

You get the warning "unmatched parameter type 'void'".

Instead I propose the parameter should just be treated as if there is none.

Original issue reported on code.google.com by [email protected] on 17 Sep 2009 at 10:28

Importing qt.gui breaks the assigning of the __proto__ variable

Example:

#include <QApplication>
#include <QScriptEngine>
#include <QDebug>


static QScriptValue defaultPrototype(QScriptContext *ctx, QScriptEngine *eng)
{
    QByteArray name = ctx->argument(0).toString().toLatin1();
    name.append('*');
    int typeId = QMetaType::type(name);
    return eng->defaultPrototype(typeId);
}


void setGlobalScriptFunction(QScriptEngine* engine, const QString& name,
QScriptEngine::FunctionSignature func)
{
    engine->globalObject().setProperty(name, engine->newFunction(func));
}


void test__proto__(QScriptEngine* engine)
{
    setGlobalScriptFunction(engine, "defaultPrototype", &defaultPrototype);
    qDebug() << engine->evaluate("var obj = new QObject();").toString();
    qDebug() << engine->evaluate("obj.__proto__ =
defaultPrototype('QWidget');").toString();
}


int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    qDebug() << "\nwithout Qt binding";
    QScriptEngine eng0;

    test__proto__(&eng0);



    qDebug() << "\nwith Qt binding";
    QScriptEngine eng1;
    qDebug() << eng1.importExtension("qt.core").isError();
    qDebug() << eng1.importExtension("qt.gui").isError();

    test__proto__(&eng1);


    app.exec();
}

The problem here is that the prototypes are not actual QObjects, since then
the bindings would have to create an instance of every C++ class we bind,
which is not ideal. So currently invoking toString() on the prototype
itself will cause an exception. Maybe we can do something clever, e.g.
check if the this-object is the prototype object.

Original issue reported on code.google.com by [email protected] on 11 Sep 2008 at 8:37

Solaris 8 generator core-dumps

What steps will reproduce the problem?
1. build the generator on solaris 8
2. run the generator

What is the expected output? What do you see instead?

The generator program core dumps in Preprocess::preprocess 
call on Solaris 8

What version of the product are you using? On what operating system?
QT 4.4.0/ Solaris 8

Please provide any additional information below.

Is this supposed to work on Solaris 8?

Original issue reported on code.google.com by [email protected] on 13 Oct 2008 at 1:41

compile error

I'm using Qt 4.5.0

g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT
-fPIC -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore
-I/usr/include/QtGui -I/usr/include/QtScript -I/usr/include -I. -Irelease
-I. -o release/qtscript_QtConcurrent.o
../../generated_cpp/com_trolltech_qt_core/qtscript_QtConcurrent.cpp
In file included from
../../generated_cpp/com_trolltech_qt_core/qtscript_QtConcurrent.cpp:10:
/usr/include/QtCore/qtconcurrentreducekernel.h: In member function ‘bool
QtConcurrent::ReduceKernel<ReduceFunctor, ReduceResultType,
T>::shouldThrottle()’:
/usr/include/QtCore/qtconcurrentreducekernel.h:214: error: ‘QThreadPool’
has not been declared
/usr/include/QtCore/qtconcurrentreducekernel.h: In member function ‘bool
QtConcurrent::ReduceKernel<ReduceFunctor, ReduceResultType,
T>::shouldStartThread()’:
/usr/include/QtCore/qtconcurrentreducekernel.h:220: error: ‘QThreadPool’
has not been declared
make[2]: *** [release/qtscript_QtConcurrent.o] Error 1



Original issue reported on code.google.com by [email protected] on 21 Mar 2009 at 9:48

check parseName and parseAssignmentExpression always

parseName and parseAssignmentExpression both can return false on error but
are not always checked. It might be a good idea to always check them.

I am not wedded to this patch in any way. If these non-checks are done on
purpose, just let me know.

Original issue reported on code.google.com by [email protected] on 23 Nov 2008 at 7:20

Attachments:

Multiple inheritance

Currently it's awkward to work with multiply inherited classes, such as
QGraphicsWidget. You have to access the secondary base class methods by
expressions like

widget.__QGraphicsItem__.zValue(widget)

It would be nice if the bindings made it possible to simply do

widget.zValue()

Original issue reported on code.google.com by [email protected] on 27 Jan 2009 at 12:16

All properties of object are not accessible from a base class reference variable

I noticed this issue when trying to implement an event filter. 

What steps will reproduce the problem?

Run the following code with qs_eval:

function ChildWidget(parent)
{
    QPushButton.call(this, "Press here", parent);
}

ChildWidget.prototype = new QPushButton();

function ParentWidget()
{
    QWidget.call(this);

    var child = new ChildWidget(this);

    child.installEventFilter(this);
}

ParentWidget.prototype = new QWidget();

ParentWidget.prototype.eventFilter = function(obj, event)
{
    if (event.type() == QEvent.MouseButtonPress)
    {
        // this causes an exception because QMouseEvent's pos function
        // cannot be found 
        var pos = event.pos();
        print(pos);
    }
}

var widget = new ParentWidget();
widget.show();

QCoreApplication.exec();

What is the expected output? What do you see instead?
In the event filter, we have only access to QObject interface of obj and
QEvent interface of event. For example, there's no way to call the pos
function of event, even if we know that the event is of type MouseButtonPress. 

What version of the product are you using? On what operating system?
Qt 4.5.0-snapshot-20090127, Qt script generator commit
940bf9c93ef10aa3303245474f1698ce0cade941, Ubuntu Linux. 



Original issue reported on code.google.com by [email protected] on 9 Feb 2009 at 12:24

Mac build

Seems on the Mac there is not QtCore, QtGui, ... include folder,
so we have to replace '#include <QtCore/...>' & Co. by the framework path,
where all the QtCore headers are

Original issue reported on code.google.com by [email protected] on 25 Feb 2009 at 1:10

Attachments:

Need to add CONFIG=plugin

On Cygwin, qtscriptgenerator-0.1.0 builds the script plugins as regular
libraries, with a versioned DLL name and an import library.  Since these
are really plugins, they should be built as such.  Patch attached.

Original issue reported on code.google.com by [email protected] on 2 Oct 2009 at 5:54

Attachments:

QGraphicsSvgItem not enabled

It was explicitly rejected in the type system, could you please enable it?
After including this into the generation, we still need to modify the
generated cpp to make sure the QGraphicsItem is chosen as default prototype
instead of QObject.

Generated file qtscript_QGraphicsSvgItem.cpp : 

Original generated code:

QScriptValue qtscript_create_QGraphicsSvgItem_class(QScriptEngine *engine)
{
...
    engine->setDefaultPrototype(qMetaTypeId<QGraphicsSvgItem*>(),
QScriptValue());
    QScriptValue proto =
engine->newVariant(qVariantFromValue((QGraphicsSvgItem*)0));
    proto.setPrototype(engine->defaultPrototype(qMetaTypeId<QObject*>())); 

Modified code:

QScriptValue qtscript_create_QGraphicsSvgItem_class(QScriptEngine *engine)
{
...
    engine->setDefaultPrototype(qMetaTypeId<QGraphicsSvgItem*>(),
QScriptValue());
    QScriptValue proto =
engine->newVariant(qVariantFromValue((QGraphicsSvgItem*)0));

proto.setPrototype(engine->defaultPrototype(qMetaTypeId<QGraphicsItem*>())); 



Original issue reported on code.google.com by [email protected] on 31 Dec 2008 at 1:16

Compilation issue with gcc 4.4.0

What steps will reproduce the problem?
1. cd generator
2. qmake
3. make

What is the expected output? What do you see instead?

g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DRXX_ALLOCATOR_INIT_0
-DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/local/Trolltech/Qt-4.5.1/mkspecs/linux-g++-64 -I.
-I/usr/local/Trolltech/Qt-4.5.1/include/QtCore
-I/usr/local/Trolltech/Qt-4.5.1/include/QtXml
-I/usr/local/Trolltech/Qt-4.5.1/include -I. -I.
-I/home/fraga/src/qtscriptgenerator-src-0.1.0/generator/../common -Iparser
-Iparser/rpp -Iparser/rpp -Irelease -I. -o release/preprocessor.o
parser/rpp/preprocessor.cpp
In file included from parser/rpp/pp.h:69,
                 from parser/rpp/preprocessor.cpp:23:
parser/rpp/pp-internal.h: In function 'void
rpp::_PP_internal::output_line(const std::string&, int, _OutputIterator)':
parser/rpp/pp-internal.h:44: error: there are no arguments to 'snprintf'
that depend on a template parameter, so a declaration of 'snprintf' must be
available
parser/rpp/pp-internal.h:44: note: (if you use '-fpermissive', G++ will
accept your code, but allowing the use of an undeclared name is deprecated)
In file included from parser/rpp/pp.h:74,
                 from parser/rpp/preprocessor.cpp:23:
parser/rpp/pp-macro-expander.h: In member function '_InputIterator
rpp::pp_macro_expander::operator()(_InputIterator, _InputIterator,
_OutputIterator)':
parser/rpp/pp-macro-expander.h:233: error: there are no arguments to
'snprintf' that depend on a template parameter, so a declaration of
'snprintf' must be available
In file included from parser/rpp/pp.h:76,
                 from parser/rpp/preprocessor.cpp:23:
parser/rpp/pp-engine-bits.h: In member function 'void rpp::pp::file(const
std::string&, _OutputIterator)':
parser/rpp/pp-engine-bits.h:50: error: there are no arguments to 'fopen'
that depend on a template parameter, so a declaration of 'fopen' must be
available
parser/rpp/pp-engine-bits.h: In member function 'void rpp::pp::file(FILE*,
_OutputIterator)':
parser/rpp/pp-engine-bits.h:80: error: there are no arguments to 'feof'
that depend on a template parameter, so a declaration of 'feof' must be
available
parser/rpp/pp-engine-bits.h:82: error: there are no arguments to 'fread'
that depend on a template parameter, so a declaration of 'fread' must be
available
parser/rpp/pp-engine-bits.h:86: error: there are no arguments to 'fclose'
that depend on a template parameter, so a declaration of 'fclose' must be
available
In file included from parser/rpp/pp.h:76,
                 from parser/rpp/preprocessor.cpp:23:
parser/rpp/pp-engine-bits.h: In member function 'FILE*
rpp::pp::find_include_file(const std::string&, std::string*,
rpp::pp::INCLUDE_POLICY, bool) const':
parser/rpp/pp-engine-bits.h:240: error: 'fopen' was not declared in this scope
parser/rpp/pp-engine-bits.h:253: error: 'fopen' was not declared in this scope
parser/rpp/pp-engine-bits.h:279: error: 'fopen' was not declared in this scope
make[1]: *** [release/preprocessor.o] Error 1
make[1]: Leaving directory
`/home/fraga/src/qtscriptgenerator-src-0.1.0/generator'
make: *** [release] Error 2


What version of the product are you using? On what operating system?

Linux

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Apr 2009 at 7:23

Initialize member variables in constructors

Not all member variables are initialized in the ctors of all classes. This
is usually OK. But the bugs that these can cause are usually very subtle.
To avoid this, just make sure every member variable is initialized.

Original issue reported on code.google.com by [email protected] on 23 Nov 2008 at 7:26

Attachments:

Include missing when building with gcc-4.4 snapshots.

What steps will reproduce the problem?
1. build generator used in amarok-2*

What is the expected output? What do you see instead?
Clean build.
Missing fopen definitions etc.

What version of the product are you using? On what operating system?
amarok-2.0.1 and amarok-2.0.2
gcc version 4.4.0-pre9999 built 20090304 (experimental) rev. 144597 (Gentoo
SVN)

Please provide any additional information below.
With attached simple patch it compiles fine.

Patch redirected to qtscriptgenerator from
http://bugs.kde.org/show_bug.cgi?id=177661

Original issue reported on code.google.com by [email protected] on 6 Mar 2009 at 12:15

Attachments:

Lazy loading of bindings

Currently the bindings are loaded as "monolithic" libs, e.g. all of QtGui
bindings in one library. It would be nice if (groups of) classes were only
loaded on demand.
Another possibility is to split e.g. the QtGui typesystem into
sub-packages; qt.gui.graphicsview, qt.gui.widgets and so on. Then you could
explicitly import only the sub-packages that you want to use.

Original issue reported on code.google.com by [email protected] on 12 Sep 2008 at 4:00

Lost basic functionality (such as widget.findChild())

Hi,
The script loader seems awesome but some initial tests are confusing.
I used to load a UI and a Script to set connections etc. (fairly standard
and basic) and thought to load the script-extensions (core/gui) to extend
what I can do in the script to set up widgets in the UI such as populating
of QListWidgets etc.

However, basic functionality such as findChild() is no longer working?
What am I doing wrong?
I noticed that findChild was not among the functions for QObject in the
generator cpp's(?)

The .js and .ui are loaded and set up very much like the calculator example
for Qt like:

     QScriptEngine engine;
     QFile scriptFile("small.js");
     scriptFile.open(QIODevice::ReadOnly);
     engine.evaluate(scriptFile.readAll());
     scriptFile.close();

     QUiLoader loader;
     QFile uiFile("small.ui");
     uiFile.open(QIODevice::ReadOnly);
     QWidget *ui = loader.load(&uiFile);
     uiFile.close();

     QScriptValue ctor = engine.evaluate("Form");
     QScriptValue scriptUi = engine.newQObject(ui,
                              QScriptEngine::ScriptOwnership);
     QScriptValue calc = ctor.construct(QScriptValueList() << scriptUi);


What steps will reproduce the problem?
1. Calling SomeWidget.findChild('someChild') on a ui widget passed to the
constructor of a Form class in a script

What is the expected output? What do you see instead?
Without the loaded extensions .findChild() returns widgets.
After loading "qt.core" and/or "qt.gui" the same call seems dead and
returns nothing.

The .ui is 

What version of the product are you using? On what operating system?
qt-scriptgenerator-master (snapshot of 2009.07.28)
WindowsXP, Qt-4.5.1 compiled for VisualStudio (nmake)

Please provide any additional information below.

<small.js>
>>function Form(ui)
>>{
>>    this.ui = ui;
>>    //this.ui.myBox.setChecked(true);            //GOOD
>>    this.ui.findChild('myBox').setChecked(true); //BAD
>>}

<small.ui>
>><?xml version="1.0" encoding="UTF-8"?>
>><ui version="4.0">
>> <class>Form</class>
>> <widget class="QWidget" name="Form">
>>  <property name="geometry">
>>   <rect>
>>    <x>0</x>
>>    <y>0</y>
>>    <width>90</width>
>>    <height>36</height>
>>   </rect>
>>  </property>
>>  <property name="windowTitle">
>>   <string>Form</string>
>>  </property>
>>  <property name="autoFillBackground">
>>   <bool>true</bool>
>>  </property>
>>  <property name="styleSheet">
>>   <string notr="true"/>
>>  </property>
>>  <layout class="QVBoxLayout" name="verticalLayout">
>>   <item>
>>    <widget class="QCheckBox" name="myBox">
>>     <property name="text">
>>      <string>CheckBox</string>
>>     </property>
>>    </widget>
>>   </item>
>>  </layout>
>> </widget>
>> <resources/>
>> <connections/>
>></ui>

Original issue reported on code.google.com by [email protected] on 30 Jul 2009 at 4:01

Attachments:

"no function match" warning always has QFile as the class name.

Hi!

It seems that when no matching overload is found for a bound type, the
error message incorrectly lists QFile as the source. e.g.:

    Error: QFile::bindValue(): could not find a function match; candidates are:
bindValue(String placeholder, Object val, ParamType type)
bindValue(int pos, Object val, ParamType type)


the error actually comes from QSqlQuery, though. i've seen this in other
class bindings as well, though, so it seems to be a generic problem.

Original issue reported on code.google.com by [email protected] on 14 Sep 2008 at 10:18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.