diff options
author | Michele Calgaro <[email protected]> | 2024-10-06 17:29:49 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-10-06 17:29:49 +0900 |
commit | 587657561bb870d457a188a80bc0ce918ef5a0bd (patch) | |
tree | baed0c3b38c4d11389c96c686967160a1b3027cd | |
parent | 4161606c301841f973f0319f46e6853c4a3fe906 (diff) | |
download | tqt3-587657561bb870d457a188a80bc0ce918ef5a0bd.tar.gz tqt3-587657561bb870d457a188a80bc0ce918ef5a0bd.zip |
Rename moc to tqmoc
Signed-off-by: Michele Calgaro <[email protected]>
79 files changed, 636 insertions, 640 deletions
@@ -26,7 +26,7 @@ the directories where you choose to install Qt. file if it is not there already. TQTDIR - the directory in which you're building Qt - PATH - to locate the moc program and other TQt tools + PATH - to locate the tqmoc program and other TQt tools MANPATH - to access the TQt man pages LD_LIBRARY_PATH - for the shared TQt library @@ -1,5 +1,5 @@ -README Getting started with Qt -INSTALL How to install Qt +README Getting started with TQt +INSTALL How to install TQt PLATFORMS How to install TQt - platform notes changes-<ver> List of changes from the last version LICENSE License statement @@ -7,15 +7,15 @@ MANIFEST This file Directories: ------------ -bin Place for TQt executables (moc, uic, etc.) -config.tests Qt configuration system -doc Qt documentation in HTML and manpage format -examples Qt example programs -include Qt include files +bin Place for TQt executables (tqmoc, tquic, etc.) +config.tests TQt configuration system +doc TQt documentation in HTML and manpage format +examples TQt example programs +include TQt include files lib Place for the TQt libraries mkspecs Platform/compiler configuration files -plugins Qt plugins -qmake Qt build system -src Qt library source code -tools Qt tools source code -tutorial Qt tutorial source code +plugins TQt plugins +qmake TQt build system +src TQt library source code +tools TQt tools source code +tutorial TQt tutorial source code @@ -11,7 +11,7 @@ uninstall: FORCE install: FORCE @$(MAKE) qt.install -all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples +all: symlinks src-qmake src-tqmoc sub-src sub-tools sub-tutorial sub-examples @echo @echo "The TQt library is now built in ./lib" @echo "The TQt examples are built in the directories in ./examples" @@ -20,23 +20,23 @@ all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples @echo "Enjoy! - the Trolltech team" @echo -qt.install: qmake-install moc-install src-install tools-install plugins-install -qt.uninstall: qmake-uninstall moc-uninstall src-uninstall tools-uninstall plugins-uninstall +qt.install: qmake-install tqmoc-install src-install tools-install plugins-install +qt.uninstall: qmake-uninstall tqmoc-uninstall src-uninstall tools-uninstall plugins-uninstall -#moc -moc-uninstall: .qmake.cache - cd src/moc && $(MAKE) uninstall -moc-install: src-moc - cd src/moc && $(MAKE) install -src-moc: src-qmake FORCE - cd src/moc && $(MAKE) +#tqmoc +tqmoc-uninstall: .qmake.cache + cd src/tqmoc && $(MAKE) uninstall +tqmoc-install: src-tqmoc + cd src/tqmoc && $(MAKE) install +src-tqmoc: src-qmake FORCE + cd src/tqmoc && $(MAKE) #Qt src-uninstall: .qmake.cache cd src && $(MAKE) uninstall src-install: sub-src cd src && $(MAKE) install -sub-src: src-moc .qmake.cache FORCE +sub-src: src-tqmoc .qmake.cache FORCE cd src && $(MAKE) #qmake @@ -80,7 +80,7 @@ symlinks: .qmake.cache distclean clean uiclean mocclean: cd tools && $(MAKE) $@ - cd src/moc && $(MAKE) $@ + cd src/tqmoc && $(MAKE) $@ cd src && $(MAKE) $@ cd tutorial && $(MAKE) $@ cd plugins/src && $(MAKE) $@ @@ -93,7 +93,7 @@ distclean clean uiclean mocclean: [ ! -f config.tests/x11/notype/Makefile ] || cd config.tests/x11/notype && $(MAKE) $@ cd qmake && $(MAKE) $@ -#confclean is actually the same as distclean, except qmake and moc +#confclean is actually the same as distclean, except qmake and tqmoc #are not cleaned. confclean: cd tools && $(MAKE) distclean @@ -1074,7 +1074,7 @@ QMAKE_VARS="$QMAKE_VARS \"QMAKE_MOC=$outpath/bin/tqmoc\"" QMAKE_VARS="$QMAKE_VARS \"QMAKE_UIC=$outpath/bin/tquic -L \$\$QT_BUILD_TREE/plugins\"" QMAKE_VARS="$QMAKE_VARS \"QMAKE_QMAKE=$outpath/bin/tqmake\"" # hacky src line -QMAKE_VARS="$QMAKE_VARS \"QMAKE_MOC_SRC=$outpath/src/moc\"" +QMAKE_VARS="$QMAKE_VARS \"QMAKE_MOC_SRC=$outpath/src/tqmoc\"" # find out which awk we want to use, prefer gawk, then nawk, then regular awk AWK= diff --git a/doc/debug.doc b/doc/debug.doc index bc0ad42d3..56eb2150b 100644 --- a/doc/debug.doc +++ b/doc/debug.doc @@ -180,7 +180,7 @@ Example: There is one bug that is so common that it deserves mention here: If you include the TQ_OBJECT macro in a class declaration and run the -\link moc.html moc\endlink, but forget to link the moc-generated +\link tqmoc.html tqmoc\endlink, but forget to link the tqmoc-generated object code into your executable, you will get very confusing error messages. Any link error complaining about a lack of \c{vtbl}, \c{_vtbl}, \c{__vtbl} or similar is likely to be a result of this diff --git a/doc/html/commonproblems.html b/doc/html/commonproblems.html index c238d909a..c8abf99f8 100644 --- a/doc/html/commonproblems.html +++ b/doc/html/commonproblems.html @@ -54,8 +54,8 @@ machine</a> <h2> Link error, complaining about a lack of <tt>vtbl</tt>, <tt>_vtbl</tt>, <tt>__vtbl</tt> or similar </h2> <a name="1"></a><p> This indicates that you've included the <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> macro in a class -declaration and probably also run the <a href="moc.html#moc">moc</a>, but forgot to link the -moc-generated object code into your executable. See <a href="moc.html">Using the Meta Object Compiler</a> for details on how to use moc. +declaration and probably also run the <a href="tqmoc.html#tqmoc">tqmoc</a>, but forgot to link the +tqmoc-generated object code into your executable. See <a href="tqmoc.html">Using the TQt Meta Object Compiler</a> for details on how to use tqmoc. <p> <a name="diffver"></a> <h2> Using different versions of TQt on the same machine </h2> @@ -70,12 +70,12 @@ TQt. Those with a command-line compiler will typically use options such as the relevant release of TQt. <p> <dt>Meta Object Compiler and other tools - Compile time -<p> <dd>Programmers need to run <em>moc</em> and other tools such as <em>uic</em>. These +<p> <dd>Programmers need to run <em>tqmoc</em> and other tools such as <em>tquic</em>. These tools are usually located in the <tt>bin</tt> subdirectory of TQt distributions. -Either run <tt>"$TQTDIR"/bin/moc</tt> and <tt>"$TQTDIR"/bin/uic</tt> or add <tt>"$TQTDIR"/bin</tt> -to your <tt>PATH</tt> and run <a href="moc.html#moc">moc</a> and <tt>uic</tt>. If you use <tt>qmake</tt> the +Either run <tt>"$TQTDIR"/bin/tqmoc</tt> and <tt>"$TQTDIR"/bin/tquic</tt> or add <tt>"$TQTDIR"/bin</tt> +to your <tt>PATH</tt> and run <a href="tqmoc.html#tqmoc">tqmoc</a> and <tt>uic</tt>. If you use <tt>qmake</tt> the appropriate lines will be added to your Makefiles so that <em>uic</em> and -<em>moc</em> will be executed as required. +<em>tqmoc</em> will be executed as required. <p> <dt>Static or shared libraries - Link time <p> <dd>Programmers need to link with the TQt static or shared libraries. The TQt libraries are usually located in the <tt>lib</tt> subdirectory of TQt distributions. @@ -101,7 +101,7 @@ source package that contain all these files once they have been built. usually consist of two parts: <p> <ul> <li> shared libraries in the run time package, usually called <tt>qt3</tt>. -<p> <li> header files, static libraries, the moc and other tools in the developers' +<p> <li> header files, static libraries, tqmoc and other tools in the developers' kit, usually called <tt>qt3-dev</tt>. <p> </ul> <p> Depending on how you are using TQt, you need to make specific parts of @@ -118,7 +118,7 @@ package with a name like <tt>qt</tt> and a developer package with a name like <tt>qt-dev</tt>. You will need the appropriate packages: <p> <ul> <p> <li> To build programs you will need the header files, the libraries, -the moc and other tools from TQt 3.x. They are included in the developer +tqmoc and other tools from TQt 3.x. They are included in the developer package of TQt 3.x (<tt>qt3-dev</tt> or similar). <p> <li> To run programs you will need the shared libraries of TQt 3.x and TQt 2.x. They are included in the regular packages of TQt 3.x (<tt>qt3</tt> @@ -131,7 +131,7 @@ need to set the environment variable <tt>TQTDIR</tt> to point to TQt 3.x. </h3> <a name="2-2"></a><p> You build and run programs for TQt 2.x and TQt 3.x. You will need: <p> <ul> -<p> <li> the header files, the libraries, the moc and other tools from TQt 3.x +<p> <li> the header files, the libraries, tqmoc and other tools from TQt 3.x and TQt 2.x to build programs, <p> <li> the shared libraries of TQt 3.x and TQt 2.x to run programs. <p> </ul> @@ -186,7 +186,7 @@ setenv PATH ${TQTDIR}/bin:${PATH} documentation appropriate to the version of TQt you're using. Also your Makfiles may refer to <tt>"$TQTDIR"/include</tt> and <tt>"$TQTDIR"/lib</tt> to include the proper header files and link with the proper libraries. -Setting the <tt>PATH</tt> ensures that the proper version of moc and other +Setting the <tt>PATH</tt> ensures that the proper version of tqmoc and other tools is being used. <p> <a name="nowinman"></a> <h2> Using TQt on X11 without a window manager diff --git a/doc/html/debug.html b/doc/html/debug.html index cbe7c9ed5..5b479b6f1 100644 --- a/doc/html/debug.html +++ b/doc/html/debug.html @@ -155,7 +155,7 @@ define TQT_NO_CHECK. </h2> <a name="4"></a><p> There is one bug that is so common that it deserves mention here: If you include the <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> macro in a class declaration and run the -<a href="moc.html">moc</a>, but forget to link the <a href="moc.html#moc">moc</a>-generated +<a href="tqmoc.html">tqmoc</a>, but forget to link the <a href="tqmoc.html#tqmoc">tqmoc</a>-generated object code into your executable, you will get very confusing error messages. Any link error complaining about a lack of <tt>vtbl</tt>, <tt>_vtbl</tt>, <tt>__vtbl</tt> or similar is likely to be a result of this diff --git a/doc/html/designer-manual-6.html b/doc/html/designer-manual-6.html index cbe5af6f1..efb9b3536 100644 --- a/doc/html/designer-manual-6.html +++ b/doc/html/designer-manual-6.html @@ -35,13 +35,13 @@ body { background: #ffffff; color: black; } <h3><a name="1"></a>Subclassing</h3> <p>We'll start with a general description of how to subclass a form and follow with a short example. Note that subclassing has some disadvantages compared with putting your code into a form directly; see <a href="designer-manual-5.html#3">Extending the functionality of a form</a> in <a href="designer-manual-5.html#the-designer-approach">The Designer Approach</a> chapter for details.</p> <h4><a name="1-1"></a>Generating Source Code from <em>TQt Designer</em> .ui Files</h4> -<p><em>TQt Designer</em> reads and writes <tt>qmake</tt><!-- index .pro --> <tt>.pro</tt> (project) files which are used to record the files used to build the application and from which Makefiles are generated. <em>TQt Designer</em> also reads and writes<!-- index .ui --> <tt>.ui</tt> (user interface) files. These are XML files that record the widgets, layouts, source code and settings you've used for a form. Every<!-- index .ui --> <tt>.ui</tt> file is converted by the <tt>uic</tt> (user interface compiler) into a C++<!-- index .h --> <tt>.h</tt> file and a C++<!-- index .cpp --> <tt>.cpp</tt> file. These C++ files are then read by <tt>moc</tt> (meta object compiler), and finally compiled by your compiler into a working application.</p> +<p><em>TQt Designer</em> reads and writes <tt>qmake</tt><!-- index .pro --> <tt>.pro</tt> (project) files which are used to record the files used to build the application and from which Makefiles are generated. <em>TQt Designer</em> also reads and writes<!-- index .ui --> <tt>.ui</tt> (user interface) files. These are XML files that record the widgets, layouts, source code and settings you've used for a form. Every<!-- index .ui --> <tt>.ui</tt> file is converted by the <tt>uic</tt> (user interface compiler) into a C++<!-- index .h --> <tt>.h</tt> file and a C++<!-- index .cpp --> <tt>.cpp</tt> file. These C++ files are then read by <tt>tqmoc</tt> (meta object compiler), and finally compiled by your compiler into a working application.</p> <!-- index Makefiles --><!-- index Projects!Adding Files --><!-- index Adding!Files to Projects --><p>If you create applications wholly within <em>TQt Designer</em> you only need to create a<!-- index main.cpp --> <tt>main.cpp</tt>.</p> <p>If you create the <tt>main.cpp</tt> file within <em>TQt Designer</em>, it will automatically be added to your project file by <em>TQt Designer</em>. If you create the <tt>main.cpp</tt> file outside of <em>TQt Designer</em> you must add it to the project file manually by adding the following line at the end of your project's<!-- index .pro --> <tt>.pro</tt> file:</p> <pre> SOURCES += main.cpp </pre> -<p>You can then use <tt>qmake</tt> to generate the Makefile. (For example <tt>qmake -o Makefile myproject.pro</tt>.) Running <tt>make</tt> (Linux, Unix or Borland compilers), or <tt>nmake</tt> (Visual C++), will then call <tt>uic</tt>, <tt>moc</tt> and your compiler as necessary to build your application.</p> +<p>You can then use <tt>qmake</tt> to generate the Makefile. (For example <tt>qmake -o Makefile myproject.pro</tt>.) Running <tt>make</tt> (Linux, Unix or Borland compilers), or <tt>nmake</tt> (Visual C++), will then call <tt>tquic</tt>, <tt>tqmoc</tt> and your compiler as necessary to build your application.</p> <!-- index Errors!Undefined reference --><!-- index Undefined references, Error --><!-- index qmake!HEADERS --><!-- index qmake!SOURCES --><p>If you use <em>TQt Designer</em> to create your main window and dialogs, but also add other C++ files, or if you subclass any of your forms you will need to add these files to the<!-- index .pro --> <tt>.pro</tt> file so that they are compiled with the rest of your application's source files. Each<!-- index .h --> <tt>.h</tt> file that you create separately from <em>TQt Designer</em> should be added to the <tt>HEADERS</tt> line, and each<!-- index .cpp --> <tt>.cpp</tt> file should be added to the <tt>SOURCES</tt> line, just as we've done for<!-- index main.cpp --> <tt>main.cpp</tt>. If you get undefined reference errors it is worth checking that you've added the names of all your header and implementation files to the<!-- index .pro --> <tt>.pro</tt> file.</p> <h4><a name="1-2"></a>Subclassing a Form</h4> <!-- index Subclassing --><p>When subclassing a form it is helpful to use a naming convention to help us identify which files are generated from <em>TQt Designer</em>'s<!-- index .ui --> <tt>.ui</tt> files and which are hand coded.</p> diff --git a/doc/html/designer-manual-9.html b/doc/html/designer-manual-9.html index 55d4ba2a7..fb8c87814 100644 --- a/doc/html/designer-manual-9.html +++ b/doc/html/designer-manual-9.html @@ -105,13 +105,13 @@ body { background: #ffffff; color: black; } <li><p>Open TQt Project -- Runs <tt>qmake</tt> with a<!-- index .pro --> <tt>.pro</tt> file</p> <li><p>Write TQt Project -- Saves the current VS project as a<!-- index .pro --> <tt>.pro</tt> file</p> <li><p>Use TQt -- Add the TQt libraries to the active project</p> -<li><p>Add MOC -- Add the <tt>moc</tt> precompiler to the active file</p> +<li><p>Add TQMoc -- Add <tt>tqmoc</tt> precompiler to the active file</p> </ul><p>Double clicking a<!-- index .ui --> <tt>.ui</tt> file in the workspace overview will now launch <em>TQt Designer</em>.</p> -<!-- index Macros!TQ_OBJECT --><!-- index TQ_OBJECT --><p>If you create a<!-- index .cpp --> <tt>.cpp</tt> file which contains the <tt>TQ_OBJECT</tt> macro you will need an additional file which is generated by the <tt>moc</tt> to be included in your project. For example, if you have 'file.cpp', then the last line would be <tt>#include "file.moc"</tt> and the additional file would be called 'file.moc'. To ensure that Visual Studio executes the <tt>moc</tt> and generates this file you must create a custom dependency. Double click the<!-- index .cpp --> <tt>.cpp</tt> file (in your project workspace) that contains the <tt>TQ_OBJECT</tt> macro. Click the <b>Add MOC</b> toolbar button; this will create an empty<!-- index .moc --> <tt>.moc</tt> file in your project workspace. Right click the newly created<!-- index .moc --> <tt>.moc</tt> file, then click <b>Settings</b> from the pop-up menu to invoke the Project Settings dialog. Click the Custom Build tab. Click the <b>Dependencies</b> button to pop up the User Defined Dependencies dialog. Type in <tt>$(InputDir)\$(InputPath)</tt>, then press <b>Return</b>. Click <b>OK</b> to leave the Dependencies dialog, then click <b>OK</b> to leave the Project Settings dialog.</p> +<!-- index Macros!TQ_OBJECT --><!-- index TQ_OBJECT --><p>If you create a<!-- index .cpp --> <tt>.cpp</tt> file which contains the <tt>TQ_OBJECT</tt> macro you will need an additional file which is generated by <tt>tqmoc</tt> to be included in your project. For example, if you have 'file.cpp', then the last line would be <tt>#include "file.moc"</tt> and the additional file would be called 'file.moc'. To ensure that Visual Studio executes the <tt>tqmoc</tt> and generates this file you must create a custom dependency. Double click the<!-- index .cpp --> <tt>.cpp</tt> file (in your project workspace) that contains the <tt>TQ_OBJECT</tt> macro. Click the <b>Add TQMoc</b> toolbar button; this will create an empty<!-- index .moc --> <tt>.moc</tt> file in your project workspace. Right click the newly created<!-- index .moc --> <tt>.moc</tt> file, then click <b>Settings</b> from the pop-up menu to invoke the Project Settings dialog. Click the Custom Build tab. Click the <b>Dependencies</b> button to pop up the User Defined Dependencies dialog. Type in <tt>$(InputDir)\$(InputPath)</tt>, then press <b>Return</b>. Click <b>OK</b> to leave the Dependencies dialog, then click <b>OK</b> to leave the Project Settings dialog.</p> <p>If you wish to delete the add-in remove it from the toolbar then delete the<!-- index qmsdev.dll --> <tt>qmsdev.dll</tt> file from the add-ins directory.</p> <h4><a name="3-1"></a>Creating Makefiles without qmake</h4> <!-- index Makefiles --><p>The <tt>qmake</tt> tool provided with TQt can create Makefiles appropriate to your platform based on<!-- index .pro --> <tt>.pro</tt> project files. This section describes the dependencies involved in building a TQt application and gives a couple of simple example Makefiles. This section assumes that you have a good understanding of Makefiles.</p> -<!-- index Macros!TQ_OBJECT --><!-- index TQ_OBJECT --><p><em>TQt Designer</em> produces<!-- index .ui --> <tt>.ui</tt> files which are used to generate<!-- index .h --> <tt>.h</tt> and<!-- index .cpp --> <tt>.cpp</tt> files for the compiler to compile. The<!-- index .ui --> <tt>.ui</tt> files are processed by <tt>uic</tt>. Classes which inherit from <a href="tqobject.html">TQObject</a>, e.g. those which use slots and signals, require an additional<!-- index .cpp --> <tt>.cpp</tt> file to be generated. These files are generated by the <tt>moc</tt> and are named '<em>moc_</em>file.cpp' where the original<!-- index .cpp --> <tt>.cpp</tt> file is called 'file.cpp'. If your<!-- index .cpp --> <tt>.cpp</tt> file contains the <tt>TQ_OBJECT</tt> macro an additional file 'file.moc' should be generated which must be <tt>#include</tt>d in the<!-- index .cpp --> <tt>.cpp</tt>, normally at the end. This requires an extra dependency being created.</p> +<!-- index Macros!TQ_OBJECT --><!-- index TQ_OBJECT --><p><em>TQt Designer</em> produces<!-- index .ui --> <tt>.ui</tt> files which are used to generate<!-- index .h --> <tt>.h</tt> and<!-- index .cpp --> <tt>.cpp</tt> files for the compiler to compile. The<!-- index .ui --> <tt>.ui</tt> files are processed by <tt>uic</tt>. Classes which inherit from <a href="tqobject.html">TQObject</a>, e.g. those which use slots and signals, require an additional<!-- index .cpp --> <tt>.cpp</tt> file to be generated. These files are generated by <tt>tqmoc</tt> and are named '<em>tqmoc_</em>file.cpp' where the original<!-- index .cpp --> <tt>.cpp</tt> file is called 'file.cpp'. If your<!-- index .cpp --> <tt>.cpp</tt> file contains the <tt>TQ_OBJECT</tt> macro an additional file 'file.moc' should be generated which must be <tt>#include</tt>d in the<!-- index .cpp --> <tt>.cpp</tt>, normally at the end. This requires an extra dependency being created.</p> <p>Processing<!-- index .ui --> <tt>.ui</tt> files with <tt>uic</tt> is done <em>twice</em>:</p> <pre> uic myform.ui -o myform.h @@ -125,23 +125,23 @@ uic -subdecl Form formbase.h formbase.ui -o form.h uic -subimpl Form form.h formbase.ui -o form.cpp </pre> <p>First we generate the header and implementation file for our base class. Then we generate the header and implementation skeletons for our subclass. Note that the use of <tt>uic</tt> to generate skeletons is not something that would be done in a Makefile, we mention it here because it can be useful for command line users. Note also that the command line for <tt>-subdecl</tt> and for <tt>-subimpl</tt> are subtly different.</p> -<p>For implementation files that contain classes which inherit from <a href="tqobject.html">TQObject</a> we must create moc files:</p> +<p>For implementation files that contain classes which inherit from <a href="tqobject.html">TQObject</a> we must create tqmoc files:</p> <pre> -moc myform.h -o moc_myform.cpp +tqmoc myform.h -o tqmoc_myform.cpp </pre> <p>We'll look at a simple Makefile to see the dependencies in practice.</p> <pre> -myapp: moc_myform.o myform.o main.o - g++ -lqt -o myapp moc_myform.o myform.o main.o +myapp: tqmoc_myform.o myform.o main.o + g++ -lqt -o myapp tqmoc_myform.o myform.o main.o main.o: main.cpp g++ -o main.o main.cpp -moc_myform.o: moc_myform.cpp - g++ -o moc_myform.o moc_myform.cpp +tqmoc_myform.o: tqmoc_myform.cpp + g++ -o tqmoc_myform.o tqmoc_myform.cpp -moc_myform.cpp: myform.h - moc myform.h -o moc_myform.cpp +tqmoc_myform.cpp: myform.h + tqmoc myform.h -o tqmoc_myform.cpp myform.o: myform.cpp g++ -o myform.o myform.cpp @@ -152,17 +152,17 @@ myform.cpp: myform.h myform.ui myform.h: myform.ui uic myform.ui -o myform.h </pre> -<p>Note that you may need to include the full path to the commands in your Makefile, and under Windows the filenames are<!-- index moc.exe --> <tt>moc.exe</tt> and<!-- index uic.exe --> <tt>uic.exe</tt>.</p> +<p>Note that you may need to include the full path to the commands in your Makefile, and under Windows the filenames are<!-- index tqmoc.exe --> <tt>tqmoc.exe</tt> and<!-- index uic.exe --> <tt>uic.exe</tt>.</p> <p>In Unix/Linux environments the <tt>make</tt> command may be able to do more for us, so we should be able to use a simpler Makefile like this:</p> <pre> -myapp: moc_myform.o myform.o main.o +myapp: tqmoc_myform.o myform.o main.o g++ -lq -o $@ $^ %.o: %.cpp g++ -o $^ $@ -moc_%.cpp: %.h - moc $^ -o $@ +tqmoc_%.cpp: %.h + tqmoc $^ -o $@ myform.cpp: myform.h myform.ui uic myform.ui -i myform.h -o myform.cpp diff --git a/doc/html/helpsystem-example.html b/doc/html/helpsystem-example.html index de203396e..b1e7d28dc 100644 --- a/doc/html/helpsystem-example.html +++ b/doc/html/helpsystem-example.html @@ -476,7 +476,7 @@ and use the make tool to build the library. <hr> <ol> <li><a name="footnote1"></a> -Note that <a href="moc.html#moc">moc</a> requires that <a href="tqobject.html">TQObject</a> +Note that <a href="tqmoc.html#tqmoc">tqmoc</a> requires that <a href="tqobject.html">TQObject</a> is the first base class. <a href="#footnote-call1">Back...</a> <li><a name="footnote2"></a> Note that we have to explicitly scope the orientation diff --git a/doc/html/index b/doc/html/index index ce66e4c63..7b3504745 100644 --- a/doc/html/index +++ b/doc/html/index @@ -7808,7 +7808,7 @@ "Tutorial #2" tutorial2.html "User Interface Compiler (uic)" uic.html "Using menus" menu-example.html -"Using the Meta Object Compiler" moc.html +"Using the Meta Object Compiler" tqmoc.html "Walkthrough: A Simple Application" simple-application.html "Walkthrough: How to use the TQt SAX2 classes" xml-sax-walkthrough.html "Walkthrough: Using SAX2 features with the TQt XML classes" xml-sax-features-walkthrough.html diff --git a/doc/html/install-mac.html b/doc/html/install-mac.html index afa1f9933..00da24b9d 100644 --- a/doc/html/install-mac.html +++ b/doc/html/install-mac.html @@ -54,7 +54,7 @@ depending on your shell) in your home directory. Create the file if it is not there already. <p> <ul> <li> TQTDIR -- the directory in which you're building TQt -<li> PATH -- to locate the <a href="moc.html#moc">moc</a> program and other TQt tools +<li> PATH -- to locate the <a href="tqmoc.html#tqmoc">tqmoc</a> program and other TQt tools <li> MANPATH -- to access the TQt man pages <li> LD_LIBRARY_PATH -- for the shared TQt library </ul> diff --git a/doc/html/install-x11.html b/doc/html/install-x11.html index 8132de2a8..100b96f07 100644 --- a/doc/html/install-x11.html +++ b/doc/html/install-x11.html @@ -55,7 +55,7 @@ depending on your shell) in your home directory. Create the file if it is not there already. <p> <ul> <li> TQTDIR -- the directory in which you're building TQt -<li> PATH -- to locate the <a href="moc.html#moc">moc</a> program and other TQt tools +<li> PATH -- to locate the <a href="tqmoc.html#tqmoc">tqmoc</a> program and other TQt tools <li> MANPATH -- to access the TQt man pages <li> LD_LIBRARY_PATH -- for the shared TQt library </ul> diff --git a/doc/html/integration.html b/doc/html/integration.html index 55f9e412a..b068387bf 100644 --- a/doc/html/integration.html +++ b/doc/html/integration.html @@ -57,7 +57,7 @@ TQt application. </a> <li><a href="#3-6"> Using the 'Use TQt In Current Project' button </a> -<li><a href="#3-7"> Using the 'Add MOC' button +<li><a href="#3-7"> Using the 'Add TQMoc' button </a> </ul> </ul> @@ -96,7 +96,7 @@ following steps. <li> Open TQt Project <li> Write TQt Project <li> Use TQt In Current Project -<li> Add MOC +<li> Add TQMoc </ul> <p> <h3> Using the 'New TQt Project' button </h3> @@ -148,10 +148,10 @@ name your <tt>qmake</tt> project file and click Save. <a name="3-6"></a><p> The 'Use TQt In Current Project' button simply adds in the necessary information for the current project so that it links against TQt and sets any other settings needed to use TQt in that project. -<p> <h3> Using the 'Add MOC' button +<p> <h3> Using the 'Add TQMoc' button </h3> -<a name="3-7"></a><p> The 'Add MOC' button will add in the custom build step for the selected file -so that it creates any needed MOC files and it will add these generated +<a name="3-7"></a><p> The 'Add TQMoc' button will add in the custom build step for the selected file +so that it creates any needed moc files and it will add these generated files to the project. All you need to do to use it is click on a file that has <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> and click the button. <p> You only need to use this button if you added a file that has <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> in it by hand, you don't need to use this if you used any diff --git a/doc/html/metaobjects.html b/doc/html/metaobjects.html index ae025c2c9..c35f3fb97 100644 --- a/doc/html/metaobjects.html +++ b/doc/html/metaobjects.html @@ -42,9 +42,9 @@ property system. <li> the <a href="tqobject.html">TQObject</a> class; <li> the TQ_OBJECT macro inside the private section of the class declaration; -<li> the <a href="moc.html">Meta Object Compiler (moc)</a>. +<li> the <a href="tqmoc.html">TQt Meta Object Compiler (tqmoc)</a>. </ol> -<p> The <em><a href="moc.html#moc">moc</a></em> reads a C++ source file. If it finds one or more class +<p> The <em><a href="tqmoc.html#tqmoc">tqmoc</a></em> reads a C++ source file. If it finds one or more class declarations that contain the TQ_OBJECT macro, it produces another C++ source file which contains the meta object code for the classes that contain the TQ_OBJECT macro. This generated source file is either diff --git a/doc/html/object.html b/doc/html/object.html index cd1cbee54..26420f9ce 100644 --- a/doc/html/object.html +++ b/doc/html/object.html @@ -61,7 +61,7 @@ pointers which become "dangling pointers" when their objects are destroyed. techniques, based on inheritance from <a href="tqobject.html">TQObject</a>. Others, like the object communication mechanism and the dynamic property system, require the <a href="metaobjects.html">Meta Object System</a> provided -by TQt's own <a href="moc.html">Meta Object Compiler (moc)</a>. +by TQt's own <a href="tqmoc.html">Meta Object Compiler (tqmoc)</a>. <p> The Meta Object System is a C++ extension that makes the language better suited to true component GUI programming. Although templates can be used to extend C++, the Meta Object System provides benefits using diff --git a/doc/html/overviews-list.html b/doc/html/overviews-list.html index 542355551..d6224514b 100644 --- a/doc/html/overviews-list.html +++ b/doc/html/overviews-list.html @@ -45,7 +45,7 @@ body { background: #ffffff; color: black; } <li> <a href="signalsandslots.html">Signals and Slots</a> <li> <a href="metaobjects.html">Meta Object System</a> <li> <a href="properties.html">Properties</a> -<li> <a href="moc.html">Using the Meta Object Compiler</a> +<li> <a href="tqmoc.html">Using the Meta Object Compiler</a> <li> <a href="templates.html">Why doesn't TQt use templates for signals and slots?</a> </ul> <p> <td valign="top"> diff --git a/doc/html/qmake-manual-1.html b/doc/html/qmake-manual-1.html index be0ec6bff..fcd265496 100644 --- a/doc/html/qmake-manual-1.html +++ b/doc/html/qmake-manual-1.html @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; } <h3><a name="1"></a>Introduction to qmake</h3> <p><em>qmake</em> is a tool created by Trolltech to write makefiles for different compilers and platforms.</p> <p>Writing makefiles by hand can be difficult and error prone, especially if several makefiles are required for different compiler and platform combinations. With <em>qmake</em>, developers create a simple single 'project' file and run <em>qmake</em> to generate the appropriate makefiles. <em>qmake</em> takes care of all the compiler and platform dependencies, freeing developers to focus on their code. Trolltech uses <em>qmake</em> as the primary build tool for the TQt library, and for the tools supplied with TQt.</p> -<p><em>qmake</em> also takes care of TQt's special requirements, automatically including build rules for <a href="moc.html">moc</a> and <em>uic</em>.</p> +<p><em>qmake</em> also takes care of TQt's special requirements, automatically including build rules for <a href="tqmoc.html">tqmoc</a> and <em>tquic</em>.</p> <!-- eof --> <p align="right">[<a href="qmake-manual.html">Home</a>] [<a href="qmake-manual-2.html">Next: Installing qmake</a>]</p> <p><address><hr><div align=center> diff --git a/doc/html/qmake-manual-4.html b/doc/html/qmake-manual-4.html index 8fe09fd1a..69d86396d 100644 --- a/doc/html/qmake-manual-4.html +++ b/doc/html/qmake-manual-4.html @@ -64,7 +64,7 @@ body { background: #ffffff; color: black; } <pre> TARGET = helloworld </pre> -<p>The final step is to set the <em>CONFIG</em> variable. Since this is a TQt application, we need to put 'qt' on the CONFIG line so that <em>qmake</em> will add the relevant libraries to be linked against and ensure that build lines for <em>moc</em> and <em>uic</em> are included in the makefile.</p> +<p>The final step is to set the <em>CONFIG</em> variable. Since this is a TQt application, we need to put 'qt' on the CONFIG line so that <em>qmake</em> will add the relevant libraries to be linked against and ensure that build lines for <em>tqmoc</em> and <em>tquic</em> are included in the makefile.</p> <p>The finished project file should look like this:</p> <pre> CONFIG += qt diff --git a/doc/html/qmake-manual-8.html b/doc/html/qmake-manual-8.html index b22e6dce5..6b26c1eac 100644 --- a/doc/html/qmake-manual-8.html +++ b/doc/html/qmake-manual-8.html @@ -141,7 +141,7 @@ DEFINES += USE_MY_STUFF QT_DLL <p>Specifies where to copy the <a href="qmake-manual-8.html#TARGET">target</a> dll.</p> <a name="HEADERS"></a><h5><a name="4-1-6"></a>HEADERS</h5> <p>Defines the header files for the project.</p> -<p><em>qmake</em> will generate dependency information (unless -nodepend is specified on the <a href="qmake-manual-8.html#Commands">command line</a>) for the specified headers. <em>qmake</em> will also automatically detect if <em>moc</em> is required by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the moc files.</p> +<p><em>qmake</em> will generate dependency information (unless -nodepend is specified on the <a href="qmake-manual-8.html#Commands">command line</a>) for the specified headers. <em>qmake</em> will also automatically detect if <em>tqmoc</em> is required by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the tqmoc files.</p> <p>For example:</p> <pre> HEADERS = myclass.h \ @@ -178,7 +178,7 @@ unix:LIBS += -lmath -L/usr/local/lib win32:LIBS += c:\mylibs\math.lib </pre> <a name="MOC_DIR"></a><h5><a name="4-1-11"></a>MOC_DIR</h5> -<p>This variable specifies the directory where all intermediate moc files should be placed.</p> +<p>This variable specifies the directory where all intermediate tqmoc files should be placed.</p> <p>For example:</p> <pre> unix:MOC_DIR = ../myproject/tmp @@ -271,7 +271,7 @@ DISTFILES += ../program.txt <p>This variable contains a list of yacc source files to be included in the project. All dependencies, headers and source files will automatically be included in the project.</p> <p>For example:</p> <pre> -YACCSOURCES = moc.y +YACCSOURCES = tqmoc.y </pre> <a name="RarelyUsedSystemVariables"></a><h4><a name="4-2"></a>Rarely Used System Variables</h4> <p>The following variables are also recognized by <em>qmake</em> but are either internal or very rarely used.</p> @@ -299,11 +299,11 @@ message($$join(urlPieces, $$LITERAL_HASH)) <a name="OBJECTS"></a><h5><a name="4-2-8"></a>OBJECTS</h5> <p>This variable is generated from the <a href="qmake-manual-8.html#SOURCES">SOURCES</a> variable. The extension of each source file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <a name="OBJMOC"></a><h5><a name="4-2-9"></a>OBJMOC</h5> -<p>This variable is set by <em>qmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>OBJMOC</tt> contains the name of all intermediate moc object files. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> +<p>This variable is set by <em>qmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>OBJMOC</tt> contains the name of all intermediate tqmoc object files. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <a name="PRECOMPILED_HEADER"></a><h5><a name="4-2-10"></a>PRECOMPILED_HEADER</h5> <p>This variable indicates the header file for creating a precompiled header file, to increase the compilation speed of a project. Precompiled headers are currently only supported on some platforms (Windows - all MSVC project types, Mac OS X - Xcode, Makefile, UNIX - gcc 3.3 and up).</p> <p>On other platforms, this variable has different meaning, as noted below.</p> -<p>This variable contains a list of header files that require some sort of pre-compilation step (such as with moc). The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> +<p>This variable contains a list of header files that require some sort of pre-compilation step (such as with tqmoc). The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <a name="QMAKE"></a><h5><a name="4-2-11"></a>QMAKE</h5> <p>This variable contains the name of the <em>qmake</em> program itself and is placed in generated makefiles. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <a name="QMAKESPEC_systemvariable"></a><h5><a name="4-2-12"></a>QMAKESPEC</h5> @@ -344,7 +344,7 @@ app { <a name="QMAKE_CFLAGS_WARN_ON"></a><h5><a name="4-2-25"></a>QMAKE_CFLAGS_WARN_ON</h5> <p>This variable is not empty if the warn_on <a href="qmake-manual-8.html#TEMPLATE">TEMPLATE</a> option is specified. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <a name="QMAKE_CLEAN"></a><h5><a name="4-2-26"></a>QMAKE_CLEAN</h5> -<p>This variable contains any files which are not generated files (such as moc and uic generated files) and object files that should be removed when using "make clean".</p> +<p>This variable contains any files which are not generated files (such as tqmoc and tquic generated files) and object files that should be removed when using "make clean".</p> <a name="QMAKE_CXXFLAGS_DEBUG"></a><h5><a name="4-2-27"></a>QMAKE_CXXFLAGS_DEBUG</h5> <p>This variable contains the C++ compiler flags for creating a debuggable application. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <a name="QMAKE_CXXFLAGS_MT"></a><h5><a name="4-2-28"></a>QMAKE_CXXFLAGS_MT</h5> @@ -484,7 +484,7 @@ app { <h5><a name="4-2-85"></a>QMAKE_MAKEFILE</h5> <p>This variable contains the name of the makefile to create. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <h5><a name="4-2-86"></a>QMAKE_MOC_SRC</h5> -<p>This variable contains the names of all moc source files to generate and include in the project. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> +<p>This variable contains the names of all tqmoc source files to generate and include in the project. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <h5><a name="4-2-87"></a>QMAKE_QMAKE</h5> <p>This variable contains the location of qmake if it is not in the path. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <h5><a name="4-2-88"></a>QMAKE_QT_DLL</h5> @@ -510,7 +510,7 @@ app { <h5><a name="4-2-96"></a>RES_FILE</h5> <p>This variable contains the name of the resource file for the application. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <h5><a name="4-2-97"></a>SRCMOC</h5> -<p>This variable is set by <em>qmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>SRCMOC</tt> contains the name of all the generated moc files. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> +<p>This variable is set by <em>qmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>SRCMOC</tt> contains the name of all the generated tqmoc files. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <h5><a name="4-2-98"></a>TARGET_EXT</h5> <p>This variable specifies the target's extension. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p> <h5><a name="4-2-99"></a>TARGET_x</h5> @@ -528,7 +528,7 @@ app { <h5><a name="4-2-105"></a>VER_PAT</h5> <p>This variable contains the patch version number of the library, if the 'lib' <a href="qmake-manual-8.html#TEMPLATE">template</a> is specified.</p> <h5><a name="4-2-106"></a>QMAKE_EXT_MOC</h5> -<p>This variable changes the extention used on included moc files.</p> +<p>This variable changes the extention used on included tqmoc files.</p> <p>See also <a href="qmake-manual-8.html#Extensions">File Extensions</a>.</p> <h5><a name="4-2-107"></a>QMAKE_EXT_UI</h5> <p>This variable changes the extention used on /e Designer UI files.</p> @@ -714,8 +714,8 @@ QMAKE_EXTRA_UNIX_TARGETS += mytarget mytarget2 <p>This is all you need to do to actually build custom targets in qmake, of course you may want to tie one of these targets to actually building the <a href="qmake-manual-8.html#TARGET">qmake build target</a>. To do this, you simply need to include your Makefile target in the list of <a href="qmake-manual-8.html#PRE_TARGETDEPS">PRE_TARGETDEPS</a>.</p> <p>For convenience there is also a method of customizing (UNIX) projects for generic new compilers (or even preprocessors).</p> <pre> -new_moc.output = moc_${QMAKE_FILE_BASE}.cpp -new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} +new_moc.output = tqmoc_${QMAKE_FILE_BASE}.cpp +new_moc.commands = tqmoc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} new_moc.depends = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,," new_moc.input = NEW_HEADERS QMAKE_EXTRA_UNIX_COMPILERS += new_moc diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index 0c680c35a..f4e2cae34 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -9802,8 +9802,8 @@ <section ref="menu-example.html" title="Using menus"> <keyword ref="menu-example.html">Using menus</keyword> </section> -<section ref="moc.html" title="Using the Meta Object Compiler"> - <keyword ref="moc.html">Using the Meta Object Compiler</keyword> +<section ref="tqmoc.html" title="Using the Meta Object Compiler"> + <keyword ref="tqmoc.html">Using the Meta Object Compiler</keyword> </section> <section ref="simple-application.html" title="Walkthrough: A Simple Application"> <keyword ref="simple-application.html">Walkthrough: A Simple Application</keyword> diff --git a/doc/html/qtmac-as-native.html b/doc/html/qtmac-as-native.html index a296649c7..812d089c9 100644 --- a/doc/html/qtmac-as-native.html +++ b/doc/html/qtmac-as-native.html @@ -118,8 +118,8 @@ the qmake tool. For example: </pre> <p> will generate an Xcode project file from project.pro. With qmake -you do not have to worry about rules for TQt's preprocessors (moc -and uic) since qmake automatically handles them and ensures that +you do not have to worry about rules for TQt's preprocessors (tqmoc +and tquic) since qmake automatically handles them and ensures that everything necessary is linked into your application. <p> TQt does not entirely interact with the development environment (for example plugins to set a file to 'mocable' from within the Xcode diff --git a/doc/html/signalsandslots.html b/doc/html/signalsandslots.html index 1ea4a9f15..5691cd3d8 100644 --- a/doc/html/signalsandslots.html +++ b/doc/html/signalsandslots.html @@ -171,11 +171,11 @@ about each other, as long as there is someone around to set up a connection between them initially. <p> The preprocessor changes or removes the <tt>signals</tt>, <tt>slots</tt> and <tt>emit</tt> keywords so that the compiler is presented with standard C++. -<p> Run the <a href="moc.html">moc</a> on class definitions that contain +<p> Run the <a href="tqmoc.html">tqmoc</a> on class definitions that contain signals or slots. This produces a C++ source file which should be compiled and linked with the other object files for the application. If you use <a href="qmake-manual.html">qmake</a>, the makefile rules to -automatically invoke the <a href="moc.html">moc</a> will be added to +automatically invoke the <a href="tqmoc.html">tqmoc</a> will be added to your makefile for you. <p> <h2> Signals </h2> @@ -197,7 +197,7 @@ mechanism is totally independent of any GUI event loop. The <p> If several slots are connected to one signal, the slots will be executed one after the other, in an arbitrary order, when the signal is emitted. -<p> Signals are automatically generated by the <a href="moc.html">moc</a> +<p> Signals are automatically generated by the <a href="tqmoc.html">tqmoc</a> and must not be implemented in the <tt>.cpp</tt> file. They can never have return types (i.e. use <tt>void</tt>). <p> A note about arguments. Our experience shows that signals and slots @@ -254,7 +254,7 @@ the signals and slots mechanism is well worth the overhead, which your users won't even notice. <p> <h2> Meta Object Information </h2> -<a name="4"></a><p> The <a href="metaobjects.html#meta-object">meta object</a> compiler (<a href="moc.html"><a href="moc.html#moc">moc</a></a>) parses the class +<a name="4"></a><p> The <a href="metaobjects.html#meta-object">meta object</a> compiler (<a href="tqmoc.html"><a href="tqmoc.html#tqmoc">tqmoc</a></a>) parses the class declaration in a C++ file and generates C++ code that initializes the meta object. The meta object contains the names of all the signal and slot members, as well as pointers to these functions. (For more @@ -287,21 +287,21 @@ declarations. </pre> <p> TQ_OBJECT is expanded by the preprocessor to declare several member -functions that are implemented by the moc; if you get compiler errors +functions that are implemented by tqmoc; if you get compiler errors along the lines of "virtual function TQButton::className not defined" -you have probably forgotten to <a href="moc.html">run the moc</a> or to -include the moc output in the link command. +you have probably forgotten to <a href="tqmoc.html">run tqmoc</a> or to +include tqmoc output in the link command. <p> <pre> public: <a href="tqlcdnumber.html">TQLCDNumber</a>( <a href="tqwidget.html">TQWidget</a> *parent=0, const char *name=0 ); TQLCDNumber( uint numDigits, TQWidget *parent=0, const char *name=0 ); </pre> -<p> It's not obviously relevant to the moc, but if you inherit TQWidget you +<p> It's not obviously relevant to tqmoc, but if you inherit TQWidget you almost certainly want to have the <em>parent</em> and <em>name</em> arguments in your constructors, and pass them to the parent constructor. -<p> Some destructors and member functions are omitted here; the moc +<p> Some destructors and member functions are omitted here; tqmoc ignores member functions. <p> <pre> signals: diff --git a/doc/html/templates.html b/doc/html/templates.html index 624f1208f..41371c5d8 100644 --- a/doc/html/templates.html +++ b/doc/html/templates.html @@ -59,15 +59,15 @@ the signals are protected in the sense of protected C++ member functions. This helps programmers get their design right from the very beginning, without even having to think about design patterns. <p> <h3>2. Precompilers are good</h3> -<p> TQt's <tt><a href="moc.html#moc">moc</a></tt> (Meta Object Compiler) provides a clean way to go +<p> TQt's <tt><a href="tqmoc.html#tqmoc">tqmoc</a></tt> (Meta Object Compiler) provides a clean way to go beyond the compiled language's facilities. It does so by generating additional C++ code which can be compiled by any standard C++ compiler. -The <tt>moc</tt> reads C++ source files. If it finds one or more class +<tt>TQMoc</tt> reads C++ source files. If it finds one or more class declarations that contain the "TQ_OBJECT" macro, it produces another C++ source file which contains the meta object code for those classes. The -C++ source file generated by the <tt>moc</tt> must be compiled and +C++ source file generated by <tt>tqmoc</tt> must be compiled and linked with the implementation of the class (or it can be -<tt>#included</tt> into the class's source file). Typically <tt>moc</tt> +<tt>#included</tt> into the class's source file). Typically <tt>tqmoc</tt> is not called manually, but automatically by the build system, so it requires no additional effort by the programmer. <p> There are other precompilers, for example, <tt>rpc</tt> and @@ -94,7 +94,7 @@ object model is a clear disadvantage over the dynamic messaging approach of Objective C when it comes to component-based graphical user interface programming. What's good for a high end database server or an operating system isn't necessarily the right design choice for a GUI frontend. -With <tt>moc</tt>, we have turned this disadvantage into an advantage, +With <tt>tqmoc</tt>, we have turned this disadvantage into an advantage, and added the flexibility required to meet the challenge of safe and efficient graphical user interface programming. <p> Our approach goes far beyond anything you can do with templates. For @@ -146,7 +146,7 @@ to use a signal to indicate that the requested data arrived. But if you need to send out every single byte one by one to a consumer, use a listener interface rather than signals and slots. <p> <h3>5. No limits</h3> -<p> Because we had the <tt>moc</tt> for signals and slots, we could add +<p> Because we had <tt>tqmoc</tt> for signals and slots, we could add other useful things to it that could not not be done with templates. Among these are scoped translations via a generated <tt>tr()</tt> function, and an advanced property system with introspection and @@ -154,7 +154,7 @@ extended runtime type information. The property system alone is a great advantage: a powerful and generic user interface design tool like TQt Designer would be a lot harder to write - if not impossible - without a powerful and introspective property system. -<p> C++ with the <tt>moc</tt> preprocessor essentially gives us the +<p> C++ with <tt>tqmoc</tt> preprocessor essentially gives us the flexibility of Objective-C or of a Java Runtime Environment, while maintaining C++'s unique performance and scalability advantages. It is what makes TQt the flexible and comfortable tool we have today. diff --git a/doc/html/titleindex b/doc/html/titleindex index 10380c1b7..112430414 100644 --- a/doc/html/titleindex +++ b/doc/html/titleindex @@ -1003,7 +1003,7 @@ Transformed Graphics Demo | xform-example.html Tutorial #2 | tutorial2.html User Interface Compiler (uic) | uic.html Using menus | menu-example.html -Using the Meta Object Compiler | moc.html +Using the Meta Object Compiler | tqmoc.html Walkthrough: A Simple Application | simple-application.html Walkthrough: How to use the TQt SAX2 classes | xml-sax-walkthrough.html Walkthrough: Using SAX2 features with the TQt XML classes | xml-sax-features-walkthrough.html diff --git a/doc/html/tools-list.html b/doc/html/tools-list.html index 68e453105..52f0711f8 100644 --- a/doc/html/tools-list.html +++ b/doc/html/tools-list.html @@ -46,7 +46,7 @@ help you need <li> <a href="qmake-manual.html">qmake</a> - create Makefiles from simple platform-independent project files <li> <a href="qembed.html">qembed</a> - convert data, e.g. images, into C++ code -<li> <a href="moc.html">moc</a> - the Meta Object Compiler +<li> <a href="tqmoc.html">tqmoc</a> - the Meta Object Compiler <li> <a href="uic.html">uic</a> - the User Interface Compiler <li> <tt>qtconfig</tt> - a Unix-based TQt configuration tool with online help <p> </ul> diff --git a/doc/html/tqmetaobject.html b/doc/html/tqmetaobject.html index 4139c53ef..ebcedc912 100644 --- a/doc/html/tqmetaobject.html +++ b/doc/html/tqmetaobject.html @@ -78,7 +78,7 @@ class's properties. <p> Classes may have a list of name-value pairs of class information. The number of pairs is returned by <a href="#numClassInfo">numClassInfo</a>(), and values are returned by <a href="#classInfo">classInfo</a>(). -<p> <p>See also <a href="moc.html">moc (Meta Object Compiler)</a> and <a href="objectmodel.html">Object Model</a>. +<p> <p>See also <a href="tqmoc.html">tqmoc (Meta Object Compiler)</a> and <a href="objectmodel.html">Object Model</a>. <p> <hr><h2>Member Function Documentation</h2> diff --git a/doc/html/moc.html b/doc/html/tqmoc.html index a69924380..bc1cce783 100644 --- a/doc/html/moc.html +++ b/doc/html/tqmoc.html @@ -1,5 +1,4 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/moc.doc:39 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> @@ -33,26 +32,26 @@ body { background: #ffffff; color: black; } -<p> <!-- index moc --><a name="moc"></a> -<p> The Meta Object Compiler, moc among friends, is the program which +<p> <!-- index tqmoc --><a name="tqmoc"></a> +<p> The TQt Meta Object Compiler, tqmoc among friends, is the program which handles TQt's <a href="metaobjects.html">C++ extensions.</a> -<p> The moc reads a C++ source file. If it finds one or more class +<p> TQMoc reads a C++ source file. If it finds one or more class declarations that contain the <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> macro, it produces another C++ source file which contains the <a href="metaobjects.html#meta-object">meta object</a> code for the classes that use the TQ_OBJECT macro. Among other things, meta object code is required for the signal/slot mechanism, runtime type information and the dynamic property system. -<p> The C++ source file generated by the moc must be compiled and linked +<p> The C++ source file generated by tqmoc must be compiled and linked with the implementation of the class (or it can be #included into the class's source file). <p> If you use <a href="qmake-manual.html">qmake</a> to create your -Makefiles, build rules will be included that call the moc when -required, so you will not need to use the moc directly. For more -background information on moc, see <a href="templates.html">Why doesn't TQt +Makefiles, build rules will be included that call tqmoc when +required, so you will not need to use tqmoc directly. For more +background information on tqmoc, see <a href="templates.html">Why doesn't TQt use templates for signals and slots?</a>. <p> <h2> Usage </h2> -<a name="1"></a><p> The moc is typically used with an input file containing class declarations +<a name="1"></a><p> TQMoc is typically used with an input file containing class declarations like this: <p> <pre> class MyClass : public <a href="tqobject.html">TQObject</a> @@ -71,7 +70,7 @@ like this: }; </pre> -<p> In addition to the signals and slots shown above, the moc also +<p> In addition to the signals and slots shown above, tqmoc also implements object properties as in the next example. The TQ_PROPERTY macro declares an object property, while TQ_ENUMS declares a list of enumeration types within the class to be usable inside the @@ -113,7 +112,7 @@ attach additional name/value-pairs to the class' meta object: <p> The three concepts, signals and slots, properties and class meta-data, can be combined. -<p> The output produced by the moc must be compiled and linked, just like +<p> The output produced by tqmoc must be compiled and linked, just like the other C++ code in your program; otherwise the build will fail in the final link phase. By convention, this is done in one of the following two ways: @@ -121,16 +120,16 @@ following two ways: <p> <dt><b>Method A: The class declaration is found in a header (<em>.h</em>) file</b> <p> <dd>If the class declaration above is found in the file -<em>myclass.h</em>, the moc output should be put in a file called -<em>moc_myclass.cpp</em>. This file should then be compiled as -usual, resulting in an object file <em>moc_myclass.o</em> (on Unix) -or <em>moc_myclass.obj</em> (on Windows). This object should then be +<em>myclass.h</em>, tqmoc output should be put in a file called +<em>tqmoc_myclass.cpp</em>. This file should then be compiled as +usual, resulting in an object file <em>tqmoc_myclass.o</em> (on Unix) +or <em>tqmoc_myclass.obj</em> (on Windows). This object should then be included in the list of object files that are linked together in the final building phase of the program. <p> <dt><b>Method B: The class declaration is found in an implementation (<em>.cpp</em>) file</b> <p> <dd>If the class declaration above is found in the file -<em>myclass.cpp</em>, the moc output should be put in a file called +<em>myclass.cpp</em>, tqmoc output should be put in a file called <em>myclass.moc</em>. This file should be #included in the implementation file, i.e. <em>myclass.cpp</em> should contain the line @@ -138,7 +137,7 @@ line #include "myclass.moc" </pre> -at the end. This will cause the moc-generated code to be compiled and +at the end. This will cause the tqmoc-generated code to be compiled and linked together with the normal class definition in <em>myclass.cpp</em>, so it is not necessary to compile and link it separately, as in Method A. <p> </dl> @@ -146,35 +145,35 @@ it is not necessary to compile and link it separately, as in Method A. want the implementation file to be self-contained, or in cases where the TQ_OBJECT class is implementation-internal and thus should not be visible in the header file. -<p> <h2> Automating moc Usage with Makefiles +<p> <h2> Automating tqmoc Usage with Makefiles </h2> <a name="2"></a><p> For anything but the simplest test programs, it is recommended that -you automate running the moc. By adding some rules to your program's -Makefile, <em>make</em> can take care of running moc when necessary and -handling the moc output. +you automate running tqmoc. By adding some rules to your program's +Makefile, <em>make</em> can take care of running tqmoc when necessary and +handling tqmoc output. <p> We recommend using Trolltech's free makefile generation tool, <a href="qmake-manual.html">qmake</a>, for building your Makefiles. This tool recognizes both Method A and B style source files, and generates a -Makefile that does all the necessary moc handling. +Makefile that does all the necessary tqmoc handling. <p> If you want to create your Makefiles yourself, here are some tips on -how to include moc handling. +how to include tqmoc handling. <p> For TQ_OBJECT class declarations in header files, here is a useful makefile rule if you only use GNU make: <p> <pre> - moc_%.cpp: %.h - moc $< -o $@ + tqmoc_%.cpp: %.h + tqmoc $< -o $@ </pre> <p> If you want to write portably, you can use individual rules with the following form: <p> <pre> - moc_NAME.cpp: NAME.h - moc $< -o $@ + tqmoc_NAME.cpp: NAME.h + tqmoc $< -o $@ </pre> -<p> You must also remember to add <em>moc_NAME.cpp</em> to your SOURCES -(substitute your favorite name) variable and <em>moc_NAME.o</em> or -<em>moc_NAME.obj</em> to your OBJECTS variable. -<p> (While we prefer to name our C++ source files .cpp, the moc doesn't +<p> You must also remember to add <em>tqmoc_NAME.cpp</em> to your SOURCES +(substitute your favorite name) variable and <em>tqmoc_NAME.o</em> or +<em>tqmoc_NAME.obj</em> to your OBJECTS variable. +<p> (While we prefer to name our C++ source files .cpp, tqmoc doesn't care, so you can use .C, .cc, .CC, .cxx or even .c++ if you prefer.) <p> For TQ_OBJECT class declarations in implementation (.cpp) files, we @@ -183,10 +182,10 @@ suggest a makefile rule like this: NAME.o: NAME.moc NAME.moc: NAME.cpp - moc -i $< -o $@ + tqmoc -i $< -o $@ </pre> -<p> This guarantees that make will run the moc before it compiles +<p> This guarantees that make will run tqmoc before it compiles <em>NAME.cpp</em>. You can then put <p> <pre> #include "NAME.moc" @@ -194,9 +193,9 @@ suggest a makefile rule like this: <p> at the end of <em>NAME.cpp</em>, where all the classes declared in that file are fully known. -<p> <h2> Invoking moc +<p> <h2> Invoking tqmoc </h2> -<a name="3"></a><p> Here are the command-line options supported by the moc: +<a name="3"></a><p> Here are the command-line options supported by tqmoc: <p> <center><table cellpadding="4" cellspacing="2" border="0"> <tr bgcolor="#a2c511"> <th valign="top">Option <th valign="top">Meaning <tr bgcolor="#f0f0f0"> @@ -211,7 +210,7 @@ standard naming conventions. <tr bgcolor="#f0f0f0"> <td valign="top">-i <td valign="top">Do not generate an #include statement in the output. -This may be used to run the moc on on a C++ file containing one or +This may be used to run tqmoc on on a C++ file containing one or more class declarations. You should then #include the meta object code in the .cpp file. If both -i and -f are present, the last one wins. @@ -223,35 +222,35 @@ file. If both -i and -f are present, the last one wins. <td valign="top">Write a flood of lex debug information to stdout. <tr bgcolor="#d0d0d0"> <td valign="top">-p <em>path</em> -<td valign="top">Makes the moc prepend <em>path</em>/ to +<td valign="top">Makes tqmoc prepend <em>path</em>/ to the file name in the generated #include statement (if one is generated). <tr bgcolor="#f0f0f0"> <td valign="top">-q <em>path</em> -<td valign="top">Makes the moc prepend <em>path</em>/ to +<td valign="top">Makes tqmoc prepend <em>path</em>/ to the file name of qt #include files in the generated code. </table></center> -<p> You can explicitly tell the moc not to parse parts of a header +<p> You can explicitly tell tqmoc not to parse parts of a header file. It recognizes any C++ comment (//) that contains the substrings MOC_SKIP_BEGIN or MOC_SKIP_END. They work as you would expect and you -can have several levels of them. The net result as seen by the moc is +can have several levels of them. The net result as seen by tqmoc is as if you had removed all lines between a MOC_SKIP_BEGIN and a MOC_SKIP_END. <p> <h2> Diagnostics </h2> -<a name="4"></a><p> The moc will warn you about a number of dangerous or illegal +<a name="4"></a><p> TQMoc will warn you about a number of dangerous or illegal constructs in the TQ_OBJECT class declarations. <p> If you get linkage errors in the final building phase of your program, saying that YourClass::className() is undefined or that YourClass lacks a vtbl, something has been done wrong. Most often, -you have forgotten to compile or #include the moc-generated C++ code, or +you have forgotten to compile or #include the tqmoc-generated C++ code, or (in the former case) include that object file in the link command. <p> <h2> Limitations </h2> -<a name="5"></a><p> The moc does not expand #include or #define, it simply skips any +<a name="5"></a><p> TQMoc does not expand #include or #define, it simply skips any preprocessor directives it encounters. This is regrettable, but is not usually a problem in practice. -<p> The moc does not handle all of C++. The main problem is that class +<p> TQMoc does not handle all of C++. The main problem is that class templates cannot have signals or slots. Here is an example: <p> <pre> class SomeTemplate<int> : public <a href="tqframe.html">TQFrame</a> { @@ -267,7 +266,7 @@ have alternatives which we think are usually better, so removing these limitations is not a high priority for us. <p> <h3> Multiple inheritance requires <a href="tqobject.html">TQObject</a> to be first </h3> -<a name="5-1"></a><p> If you are using multiple inheritance, moc assumes that the <em>first</em> +<a name="5-1"></a><p> If you are using multiple inheritance, tqmoc assumes that the <em>first</em> inherited class is a subclass of TQObject. Also, be sure that <em>only</em> the first inherited class is a TQObject. <p> <pre> @@ -276,7 +275,7 @@ the first inherited class is a TQObject. }; </pre> -<p> (This limitation is almost impossible to remove; since the moc does not expand +<p> (This limitation is almost impossible to remove; since tqmoc does not expand #include or #define, it cannot find out which one of the base classes is a TQObject.) <p> <h3> Function pointers cannot be arguments to signals or slots @@ -347,7 +346,7 @@ function which is overloaded? <p> <p> <h3> Type macros cannot be used for signal and slot parameters </h3> -<a name="5-5"></a><p> Since the moc does not expand #define, type macros that take an argument +<a name="5-5"></a><p> Since tqmoc does not expand #define, type macros that take an argument will not work in signals and slots. Here is an illegal example: <p> <pre> #ifdef ultrix @@ -408,7 +407,7 @@ contains the respective get and set functions </h3> <a name="5-8"></a><p> Declaring the first property within or after the public section that contains the type definition and the respective get and set functions -does not work as expected. The moc will complain that it can neither +does not work as expected. TQMoc will complain that it can neither find the functions nor resolve the type. Here is an example of the illegal syntax: <p> <pre> diff --git a/doc/html/tqobject.html b/doc/html/tqobject.html index 74d40b68c..6a387235b 100644 --- a/doc/html/tqobject.html +++ b/doc/html/tqobject.html @@ -149,7 +149,7 @@ to catch child events. TQt; see <a href="tqtimer.html">TQTimer</a> for high-level support for timers. <p> Notice that the <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> macro is mandatory for any object that implements signals, slots or properties. You also need to run the -<a href="moc.html">moc program (Meta Object Compiler)</a> on the +<a href="tqmoc.html">tqmoc program (Meta Object Compiler)</a> on the source file. We strongly recommend the use of this macro in <em>all</em> subclasses of TQObject regardless of whether or not they actually use signals, slots and properties, since failure to do so may lead diff --git a/doc/html/xform-example.html b/doc/html/xform-example.html index 8c68a619d..f179ff12f 100644 --- a/doc/html/xform-example.html +++ b/doc/html/xform-example.html @@ -544,7 +544,7 @@ int main( int argc, char **argv ) return a.<a href="ntqapplication.html#exec">exec</a>(); } -#include "xform.moc" // include metadata generated by the <a href="moc.html#moc">moc</a> +#include "xform.moc" // include metadata generated by the <a href="tqmoc.html#tqmoc">tqmoc</a> </pre> <p>See also <a href="examples.html">Examples</a>. diff --git a/doc/i18n.doc b/doc/i18n.doc index 3c38b5d42..4b51c6654 100644 --- a/doc/i18n.doc +++ b/doc/i18n.doc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Explanation of moc and the meta object system +** Explanation of tqmoc and the meta object system ** ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** diff --git a/doc/installation.doc b/doc/installation.doc index 4766797b9..d9291b80f 100644 --- a/doc/installation.doc +++ b/doc/installation.doc @@ -83,7 +83,7 @@ where you choose to install Qt. \list \i TQTDIR -- the directory in which you're building Qt - \i PATH -- to locate the moc program and other TQt tools + \i PATH -- to locate the tqmoc program and other TQt tools \i MANPATH -- to access the TQt man pages \i LD_LIBRARY_PATH -- for the shared TQt library \endlist @@ -210,7 +210,7 @@ the directories where you choose to install Qt. \list \i TQTDIR -- the directory in which you're building Qt - \i PATH -- to locate the moc program and other TQt tools + \i PATH -- to locate the tqmoc program and other TQt tools \i MANPATH -- to access the TQt man pages \i LD_LIBRARY_PATH -- for the shared TQt library \endlist diff --git a/doc/integration.doc b/doc/integration.doc index 9328ca231..a3de47fda 100644 --- a/doc/integration.doc +++ b/doc/integration.doc @@ -86,7 +86,7 @@ \i Open TQt Project \i Write TQt Project \i Use TQt In Current Project - \i Add MOC + \i Add TQMoc \endlist \section2 Using the 'New TQt Project' button @@ -149,10 +149,10 @@ information for the current project so that it links against TQt and sets any other settings needed to use TQt in that project. - \section2 Using the 'Add MOC' button + \section2 Using the 'Add TQMoc' button - The 'Add MOC' button will add in the custom build step for the selected file - so that it creates any needed MOC files and it will add these generated + The 'Add TQMoc' button will add in the custom build step for the selected file + so that it creates any needed moc files and it will add these generated files to the project. All you need to do to use it is click on a file that has \c TQ_OBJECT and click the button. diff --git a/doc/man/man1/tqmoc.1 b/doc/man/man1/tqmoc.1 index 301e95cc3..3854c4bfa 100644 --- a/doc/man/man1/tqmoc.1 +++ b/doc/man/man1/tqmoc.1 @@ -1,6 +1,6 @@ .TH tqmoc 1 "24 June 2001" "Trolltech AS" \" -*- nroff -*- .\" -.\" $Id: qt/moc.1 3.3.8 edited Jan 11 14:38 $ +.\" $Id: qt/tqmoc.1 3.3.8 edited Jan 11 14:38 $ .\" .\" Copyright (C) 1992-2007 Trolltech ASA. All rights reserved. .\" diff --git a/doc/man/man3/tqmetaobject.3qt b/doc/man/man3/tqmetaobject.3qt index 7a68ee4d7..e56365a3b 100644 --- a/doc/man/man3/tqmetaobject.3qt +++ b/doc/man/man3/tqmetaobject.3qt @@ -80,7 +80,7 @@ property() and propertyNames() to obtain information about a class's properties. .PP Classes may have a list of name-value pairs of class information. The number of pairs is returned by numClassInfo(), and values are returned by classInfo(). .PP -See also moc (Meta Object Compiler) and Object Model. +See also tqmoc (Meta Object Compiler) and Object Model. .PP .SH MEMBER FUNCTION DOCUMENTATION .SH "const QClassInfo * TQMetaObject::classInfo ( int index, bool super = FALSE ) const" diff --git a/doc/man/man3/tqobject.3qt b/doc/man/man3/tqobject.3qt index 7c371e7ae..ecf09e225 100644 --- a/doc/man/man3/tqobject.3qt +++ b/doc/man/man3/tqobject.3qt @@ -209,7 +209,7 @@ TQObjects can receive events through event() and filter the events of other obje .PP Last but not least, TQObject provides the basic timer support in Qt; see TQTimer for high-level support for timers. .PP -Notice that the TQ_OBJECT macro is mandatory for any object that implements signals, slots or properties. You also need to run the moc program (Meta Object Compiler) on the source file. We strongly recommend the use of this macro in \fIall\fR subclasses of TQObject regardless of whether or not they actually use signals, slots and properties, since failure to do so may lead certain functions to exhibit undefined behaviour. +Notice that the TQ_OBJECT macro is mandatory for any object that implements signals, slots or properties. You also need to run the tqmoc program (Meta Object Compiler) on the source file. We strongly recommend the use of this macro in \fIall\fR subclasses of TQObject regardless of whether or not they actually use signals, slots and properties, since failure to do so may lead certain functions to exhibit undefined behaviour. .PP All TQt widgets inherit TQObject. The convenience function isWidgetType() returns whether an object is actually a widget. It is much faster than inherits( "TQWidget" ). .PP diff --git a/doc/metaobjects.doc b/doc/metaobjects.doc index 0e9cb162e..3ee82c19f 100644 --- a/doc/metaobjects.doc +++ b/doc/metaobjects.doc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Explanation of moc and the meta object system +** Explanation of tqmoc and the meta object system ** ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** @@ -53,10 +53,10 @@ The Meta Object System is based on three things: \i the \l TQObject class; \i the TQ_OBJECT macro inside the private section of the class declaration; -\i the \link moc.html Meta Object Compiler (moc)\endlink. +\i the \link tqmoc.html Meta Object Compiler (tqmoc)\endlink. \endlist -The \e moc reads a C++ source file. If it finds one or more class +\e TQMoc reads a C++ source file. If it finds one or more class declarations that contain the TQ_OBJECT macro, it produces another C++ source file which contains the meta object code for the classes that contain the TQ_OBJECT macro. This generated source file is either diff --git a/doc/misc.doc b/doc/misc.doc index cebe61126..05d351a54 100644 --- a/doc/misc.doc +++ b/doc/misc.doc @@ -66,9 +66,9 @@ machine\endlink \section1 Link error, complaining about a lack of \c vtbl, \c _vtbl, \c __vtbl or similar This indicates that you've included the TQ_OBJECT macro in a class -declaration and probably also run the moc, but forgot to link the -moc-generated object code into your executable. See \link moc.html -Using the Meta Object Compiler\endlink for details on how to use moc. +declaration and probably also run tqmoc, but forgot to link the +moc-generated object code into your executable. See \link tqmoc.html +Using the Meta Object Compiler\endlink for details on how to use tqmoc. \target diffver \section1 Using different versions of TQt on the same machine @@ -88,12 +88,12 @@ the relevant release of Qt. <dt>Meta Object Compiler and other tools - Compile time -<dd>Programmers need to run \e moc and other tools such as \e uic. These +<dd>Programmers need to run \e tqmoc and other tools such as \e uic. These tools are usually located in the \c bin subdirectory of TQt distributions. -Either run \c "$TQTDIR"/bin/moc and \c "$TQTDIR"/bin/uic or add \c "$TQTDIR"/bin -to your \c PATH and run \c moc and \c uic. If you use \c qmake the +Either run \c "$TQTDIR"/bin/tqmoc and \c "$TQTDIR"/bin/tquic or add \c "$TQTDIR"/bin +to your \c PATH and run \c tqmoc and \c tquic. If you use \c qmake the appropriate lines will be added to your Makefiles so that \e uic and -\e moc will be executed as required. +\e tqmoc will be executed as required. <dt>Static or shared libraries - Link time @@ -128,7 +128,7 @@ usually consist of two parts: \list \i shared libraries in the run time package, usually called \c qt3. -\i header files, static libraries, the moc and other tools in the developers' +\i header files, static libraries, tqmoc and other tools in the developers' kit, usually called \c qt3-dev. \endlist @@ -150,7 +150,7 @@ like \c qt-dev. You will need the appropriate packages: \list \i To build programs you will need the header files, the libraries, -the moc and other tools from TQt 3.x. They are included in the developer +tqmoc and other tools from TQt 3.x. They are included in the developer package of TQt 3.x (\c qt3-dev or similar). \i To run programs you will need the shared libraries of TQt 3.x and @@ -169,7 +169,7 @@ You build and run programs for TQt 2.x and TQt 3.x. You will need: \list -\i the header files, the libraries, the moc and other tools from TQt 3.x +\i the header files, the libraries, tqmoc and other tools from TQt 3.x and TQt 2.x to build programs, \i the shared libraries of TQt 3.x and TQt 2.x to run programs. @@ -234,7 +234,7 @@ Setting \c TQTDIR ensures that the proper resources are used, such as the documentation appropriate to the version of TQt you're using. Also your Makfiles may refer to \c "$TQTDIR"/include and \c "$TQTDIR"/lib to include the proper header files and link with the proper libraries. -Setting the \c PATH ensures that the proper version of moc and other +Setting the \c PATH ensures that the proper version of tqmoc and other tools is being used. \target nowinman diff --git a/doc/object.doc b/doc/object.doc index 50c7a1fd3..5282000c6 100644 --- a/doc/object.doc +++ b/doc/object.doc @@ -72,7 +72,7 @@ Many of these TQt features are implemented with standard C++ techniques, based on inheritance from \l TQObject. Others, like the object communication mechanism and the dynamic property system, require the \link metaobjects.html Meta Object System \endlink provided -by Qt's own \link moc.html Meta Object Compiler (moc) \endlink. +by TQt's own \link tqmoc.html Meta Object Compiler (tqmoc) \endlink. The Meta Object System is a C++ extension that makes the language better suited to true component GUI programming. Although templates can @@ -646,15 +646,15 @@ beginning, without even having to think about design patterns. <h3>2. Precompilers are good</h3> -Qt's <tt>moc</tt> (Meta Object Compiler) provides a clean way to go +TQt's <tt>tqmoc</tt> (Meta Object Compiler) provides a clean way to go beyond the compiled language's facilities. It does so by generating additional C++ code which can be compiled by any standard C++ compiler. -The <tt>moc</tt> reads C++ source files. If it finds one or more class +<tt>TQMoc</tt> reads C++ source files. If it finds one or more class declarations that contain the "TQ_OBJECT" macro, it produces another C++ source file which contains the meta object code for those classes. The -C++ source file generated by the <tt>moc</tt> must be compiled and +C++ source file generated by <tt>tqmoc</tt> must be compiled and linked with the implementation of the class (or it can be -<tt>#included</tt> into the class's source file). Typically <tt>moc</tt> +<tt>#included</tt> into the class's source file). Typically <tt>tqmoc</tt> is not called manually, but automatically by the build system, so it requires no additional effort by the programmer. @@ -686,7 +686,7 @@ object model is a clear disadvantage over the dynamic messaging approach of Objective C when it comes to component-based graphical user interface programming. What's good for a high end database server or an operating system isn't necessarily the right design choice for a GUI frontend. -With <tt>moc</tt>, we have turned this disadvantage into an advantage, +With <tt>tqmoc</tt>, we have turned this disadvantage into an advantage, and added the flexibility required to meet the challenge of safe and efficient graphical user interface programming. @@ -746,7 +746,7 @@ listener interface rather than signals and slots. <h3>5. No limits</h3> -Because we had the <tt>moc</tt> for signals and slots, we could add +Because we had <tt>tqmoc</tt> for signals and slots, we could add other useful things to it that could not not be done with templates. Among these are scoped translations via a generated <tt>tr()</tt> function, and an advanced property system with introspection and @@ -755,7 +755,7 @@ advantage: a powerful and generic user interface design tool like Qt Designer would be a lot harder to write - if not impossible - without a powerful and introspective property system. -C++ with the <tt>moc</tt> preprocessor essentially gives us the +C++ with <tt>tqmoc</tt> preprocessor essentially gives us the flexibility of Objective-C or of a Java Runtime Environment, while maintaining C++'s unique performance and scalability advantages. It is what makes TQt the flexible and comfortable tool we have today. diff --git a/doc/overviews-list.doc b/doc/overviews-list.doc index 75b511f7d..28bcd2b16 100644 --- a/doc/overviews-list.doc +++ b/doc/overviews-list.doc @@ -55,7 +55,7 @@ \i \link signalsandslots.html Signals and Slots \endlink \i \link metaobjects.html Meta Object System \endlink \i \link properties.html Properties \endlink - \i \link moc.html Using the Meta Object Compiler \endlink + \i \link tqmoc.html Using the Meta Object Compiler \endlink \i \link templates.html Why doesn't TQt use templates for signals and slots? \endlink \endlist diff --git a/doc/qtmac-as-native.doc b/doc/qtmac-as-native.doc index c0093d726..b69265206 100644 --- a/doc/qtmac-as-native.doc +++ b/doc/qtmac-as-native.doc @@ -148,8 +148,8 @@ it can interact with specific components of the Mac OS X experience: \endcode will generate an Xcode project file from project.pro. With qmake - you do not have to worry about rules for Qt's preprocessors (moc - and uic) since qmake automatically handles them and ensures that + you do not have to worry about rules for TQt's preprocessors (tqmoc + and tquic) since qmake automatically handles them and ensures that everything necessary is linked into your application. TQt does not entirely interact with the development environment (for diff --git a/doc/signalsandslots.doc b/doc/signalsandslots.doc index e58e199b5..099fdf70a 100644 --- a/doc/signalsandslots.doc +++ b/doc/signalsandslots.doc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Explanation of moc and the meta object system +** Explanation of tqmoc and the meta object system ** ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** @@ -202,11 +202,11 @@ connection between them initially. The preprocessor changes or removes the \c{signals}, \c{slots} and \c{emit} keywords so that the compiler is presented with standard C++. -Run the \link moc.html moc\endlink on class definitions that contain +Run the \link tqmoc.html tqmoc\endlink on class definitions that contain signals or slots. This produces a C++ source file which should be compiled and linked with the other object files for the application. If you use \link qmake-manual.book qmake\endlink, the makefile rules to -automatically invoke the \link moc.html moc\endlink will be added to +automatically invoke the \link tqmoc.html tqmoc\endlink will be added to your makefile for you. \section1 Signals @@ -233,7 +233,7 @@ If several slots are connected to one signal, the slots will be executed one after the other, in an arbitrary order, when the signal is emitted. -Signals are automatically generated by the \link moc.html moc\endlink +Signals are automatically generated by the \link tqmoc.html tqmoc\endlink and must not be implemented in the \c .cpp file. They can never have return types (i.e. use \c void). @@ -301,7 +301,7 @@ users won't even notice. \section1 Meta Object Information -The meta object compiler (\link moc.html moc\endlink) parses the class +The meta object compiler (\link tqmoc.html tqmoc\endlink) parses the class declaration in a C++ file and generates C++ code that initializes the meta object. The meta object contains the names of all the signal and slot members, as well as pointers to these functions. (For more @@ -339,10 +339,10 @@ declarations. \endcode TQ_OBJECT is expanded by the preprocessor to declare several member -functions that are implemented by the moc; if you get compiler errors +functions that are implemented by tqmoc; if you get compiler errors along the lines of "virtual function TQButton::className not defined" -you have probably forgotten to \link moc.html run the moc\endlink or to -include the moc output in the link command. +you have probably forgotten to \link tqmoc.html run tqmoc\endlink or to +include tqmoc output in the link command. \code public: @@ -350,12 +350,12 @@ include the moc output in the link command. TQLCDNumber( uint numDigits, TQWidget *parent=0, const char *name=0 ); \endcode -It's not obviously relevant to the moc, but if you inherit TQWidget you +It's not obviously relevant to tqmoc, but if you inherit TQWidget you almost certainly want to have the \e{parent} and \e{name} arguments in your constructors, and pass them to the parent constructor. -Some destructors and member functions are omitted here; the moc +Some destructors and member functions are omitted here; tqmoc ignores member functions. \code diff --git a/doc/tools-list.doc b/doc/tools-list.doc index a844c08e9..16efa8823 100644 --- a/doc/tools-list.doc +++ b/doc/tools-list.doc @@ -16,8 +16,8 @@ \i \link qmake-manual.book qmake \endlink - create Makefiles from simple platform-independent project files \i \link qembed.html qembed\endlink - convert data, e.g. images, into C++ code - \i \link moc.html moc\endlink - the Meta Object Compiler - \i \link uic.html uic\endlink - the User Interface Compiler + \i \link tqmoc.html tqmoc\endlink - the Meta Object Compiler + \i \link tquic.html tquic\endlink - the User Interface Compiler \i \c qtconfig - a Unix-based TQt configuration tool with online help \endlist diff --git a/doc/moc.doc b/doc/tqmoc.doc index 27f11d2d7..edfcd4f5d 100644 --- a/doc/moc.doc +++ b/doc/tqmoc.doc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Moc usage, expanded from the manual page +** TQMoc usage, expanded from the manual page ** ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** @@ -36,39 +36,39 @@ ** **********************************************************************/ -// Note: Text in this file must also be copied to the moc man page: -// src/moc/moc.1 +// Note: Text in this file must also be copied to the tqmoc man page: +// src/tqmoc/tqmoc.1 /*! -\page moc.html +\page tqmoc.html \title Using the Meta Object Compiler -\keyword moc +\keyword tqmoc -The Meta Object Compiler, moc among friends, is the program which -handles Qt's \link metaobjects.html C++ extensions.\endlink +The Meta Object Compiler, tqmoc among friends, is the program which +handles TQt's \link metaobjects.html C++ extensions.\endlink -The moc reads a C++ source file. If it finds one or more class +TQMoc reads a C++ source file. If it finds one or more class declarations that contain the TQ_OBJECT macro, it produces another C++ source file which contains the meta object code for the classes that use the TQ_OBJECT macro. Among other things, meta object code is required for the signal/slot mechanism, runtime type information and the dynamic property system. -The C++ source file generated by the moc must be compiled and linked +The C++ source file generated by tqmoc must be compiled and linked with the implementation of the class (or it can be #included into the class's source file). If you use \link qmake-manual.book qmake\endlink to create your -Makefiles, build rules will be included that call the moc when -required, so you will not need to use the moc directly. For more -background information on moc, see \link templates.html Why doesn't Qt +Makefiles, build rules will be included that call tqmoc when +required, so you will not need to use tqmoc directly. For more +background information on tqmoc, see \link templates.html Why doesn't Qt use templates for signals and slots?\endlink. \section1 Usage -The moc is typically used with an input file containing class declarations +TQMoc is typically used with an input file containing class declarations like this: \code @@ -88,7 +88,7 @@ like this: }; \endcode -In addition to the signals and slots shown above, the moc also +In addition to the signals and slots shown above, tqmoc also implements object properties as in the next example. The TQ_PROPERTY macro declares an object property, while TQ_ENUMS declares a list of enumeration types within the class to be usable inside the @@ -133,7 +133,7 @@ attach additional name/value-pairs to the class' meta object: The three concepts, signals and slots, properties and class meta-data, can be combined. -The output produced by the moc must be compiled and linked, just like +The output produced by tqmoc must be compiled and linked, just like the other C++ code in your program; otherwise the build will fail in the final link phase. By convention, this is done in one of the following two ways: @@ -144,10 +144,10 @@ following two ways: (\e .h) file</b> <dd>If the class declaration above is found in the file -\e myclass.h, the moc output should be put in a file called -\e moc_myclass.cpp. This file should then be compiled as -usual, resulting in an object file \e moc_myclass.o (on Unix) -or \e moc_myclass.obj (on Windows). This object should then be +\e myclass.h, tqmoc output should be put in a file called +\e tqmoc_myclass.cpp. This file should then be compiled as +usual, resulting in an object file \e tqmoc_myclass.o (on Unix) +or \e tqmoc_myclass.obj (on Windows). This object should then be included in the list of object files that are linked together in the final building phase of the program. @@ -156,14 +156,14 @@ final building phase of the program. (\e .cpp) file</b> <dd>If the class declaration above is found in the file -\e myclass.cpp, the moc output should be put in a file called +\e myclass.cpp, tqmoc output should be put in a file called \e myclass.moc. This file should be #included in the implementation file, i.e. \e myclass.cpp should contain the line \code #include "myclass.moc" \endcode -at the end. This will cause the moc-generated code to be compiled and +at the end. This will cause the tqmoc-generated code to be compiled and linked together with the normal class definition in \e myclass.cpp, so it is not necessary to compile and link it separately, as in Method A. @@ -175,42 +175,42 @@ the TQ_OBJECT class is implementation-internal and thus should not be visible in the header file. -\section1 Automating moc Usage with Makefiles +\section1 Automating tqmoc Usage with Makefiles For anything but the simplest test programs, it is recommended that -you automate running the moc. By adding some rules to your program's -Makefile, \e make can take care of running moc when necessary and -handling the moc output. +you automate running the tqmoc. By adding some rules to your program's +Makefile, \e make can take care of running tqmoc when necessary and +handling tqmoc output. We recommend using Trolltech's free makefile generation tool, \link qmake-manual.book qmake\endlink, for building your Makefiles. This tool recognizes both Method A and B style source files, and generates a -Makefile that does all the necessary moc handling. +Makefile that does all the necessary tqmoc handling. If you want to create your Makefiles yourself, here are some tips on -how to include moc handling. +how to include tqmoc handling. For TQ_OBJECT class declarations in header files, here is a useful makefile rule if you only use GNU make: \code - moc_%.cpp: %.h - moc $< -o $@ + tqmoc_%.cpp: %.h + tqmoc $< -o $@ \endcode If you want to write portably, you can use individual rules with the following form: \code - moc_NAME.cpp: NAME.h - moc $< -o $@ + tqmoc_NAME.cpp: NAME.h + tqmoc $< -o $@ \endcode -You must also remember to add \e moc_NAME.cpp to your SOURCES -(substitute your favorite name) variable and \e moc_NAME.o or -\e moc_NAME.obj to your OBJECTS variable. +You must also remember to add \e tqmoc_NAME.cpp to your SOURCES +(substitute your favorite name) variable and \e tqmoc_NAME.o or +\e tqmoc_NAME.obj to your OBJECTS variable. -(While we prefer to name our C++ source files .cpp, the moc doesn't +(While we prefer to name our C++ source files .cpp, tqmoc doesn't care, so you can use .C, .cc, .CC, .cxx or even .c++ if you prefer.) @@ -221,10 +221,10 @@ suggest a makefile rule like this: NAME.o: NAME.moc NAME.moc: NAME.cpp - moc -i $< -o $@ + tqmoc -i $< -o $@ \endcode -This guarantees that make will run the moc before it compiles +This guarantees that make will run tqmoc before it compiles \e NAME.cpp. You can then put \code @@ -235,9 +235,9 @@ at the end of \e NAME.cpp, where all the classes declared in that file are fully known. -\section1 Invoking moc +\section1 Invoking tqmoc -Here are the command-line options supported by the moc: +Here are the command-line options supported by tqmoc: \table \header \i Option \i Meaning @@ -254,7 +254,7 @@ standard naming conventions. \row \i -i \i Do not generate an #include statement in the output. -This may be used to run the moc on on a C++ file containing one or +This may be used to run tqmoc on on a C++ file containing one or more class declarations. You should then #include the meta object code in the .cpp file. If both -i and -f are present, the last one wins. @@ -266,42 +266,42 @@ file. If both -i and -f are present, the last one wins. \i Write a flood of lex debug information to stdout. \row \i -p \e path -\i Makes the moc prepend \e {path}/ to +\i Makes tqmoc prepend \e {path}/ to the file name in the generated #include statement (if one is generated). \row \i -q \e path -\i Makes the moc prepend \e {path}/ to +\i Makes tqmoc prepend \e {path}/ to the file name of qt #include files in the generated code. \endtable -You can explicitly tell the moc not to parse parts of a header +You can explicitly tell tqmoc not to parse parts of a header file. It recognizes any C++ comment (//) that contains the substrings MOC_SKIP_BEGIN or MOC_SKIP_END. They work as you would expect and you -can have several levels of them. The net result as seen by the moc is +can have several levels of them. The net result as seen by tqmoc is as if you had removed all lines between a MOC_SKIP_BEGIN and a MOC_SKIP_END. \section1 Diagnostics -The moc will warn you about a number of dangerous or illegal +TQMoc will warn you about a number of dangerous or illegal constructs in the TQ_OBJECT class declarations. If you get linkage errors in the final building phase of your program, saying that YourClass::className() is undefined or that YourClass lacks a vtbl, something has been done wrong. Most often, -you have forgotten to compile or #include the moc-generated C++ code, or +you have forgotten to compile or #include the tqmoc-generated C++ code, or (in the former case) include that object file in the link command. \section1 Limitations -The moc does not expand #include or #define, it simply skips any +TQMoc does not expand #include or #define, it simply skips any preprocessor directives it encounters. This is regrettable, but is not usually a problem in practice. -The moc does not handle all of C++. The main problem is that class +TQMoc does not handle all of C++. The main problem is that class templates cannot have signals or slots. Here is an example: \code @@ -319,7 +319,7 @@ limitations is not a high priority for us. \section2 Multiple inheritance requires TQObject to be first -If you are using multiple inheritance, moc assumes that the \e first +If you are using multiple inheritance, tqmoc assumes that the \e first inherited class is a subclass of TQObject. Also, be sure that \e only the first inherited class is a TQObject. @@ -329,7 +329,7 @@ the first inherited class is a TQObject. }; \endcode -(This limitation is almost impossible to remove; since the moc does not expand +(This limitation is almost impossible to remove; since tqmoc does not expand #include or #define, it cannot find out which one of the base classes is a TQObject.) @@ -410,7 +410,7 @@ C++ ARM, section r.11.3 \section2 Type macros cannot be used for signal and slot parameters -Since the moc does not expand #define, type macros that take an argument +Since tqmoc does not expand #define, type macros that take an argument will not work in signals and slots. Here is an illegal example: \code @@ -475,7 +475,7 @@ contains the respective get and set functions Declaring the first property within or after the public section that contains the type definition and the respective get and set functions -does not work as expected. The moc will complain that it can neither +does not work as expected. TQMoc will complain that it can neither find the functions nor resolve the type. Here is an example of the illegal syntax: diff --git a/examples/helpsystem/helpsystem.doc b/examples/helpsystem/helpsystem.doc index 2ccbc4f47..d21bfbcc0 100644 --- a/examples/helpsystem/helpsystem.doc +++ b/examples/helpsystem/helpsystem.doc @@ -78,7 +78,7 @@ The WhatsThis class is a subclass of both TQObject and TQWhatsThis and serves as a base class for the HeaderWhatsThis - and TableWhatsThis classes. \footnote Note that moc requires that TQObject + and TableWhatsThis classes. \footnote Note that tqmoc requires that TQObject is the first base class. \endfootnote WhatsThis reimplements clicked() which will be called when the user clicks inside the "What's this?" window. It also declares a signal diff --git a/mkspecs/win32-borland/qmake.conf b/mkspecs/win32-borland/qmake.conf index e0bfac62f..d43424761 100644 --- a/mkspecs/win32-borland/qmake.conf +++ b/mkspecs/win32-borland/qmake.conf @@ -88,7 +88,7 @@ QMAKE_LIBS_QT_ENTRY = qtmain.lib QMAKE_LIBS_OPENGL = QMAKE_LFLAGS_OPENGL = /dopengl32.dll -QMAKE_MOC = $(TQTDIR)\bin\moc.exe +QMAKE_MOC = $(TQTDIR)\bin\tqmoc.exe QMAKE_UIC = $(TQTDIR)\bin\uic.exe QMAKE_IDC = $(TQTDIR)\bin\idc.exe diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index 336d86051..4e79b3c8d 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -77,7 +77,7 @@ QMAKE_LIBS_QT_ENTRY = -lqtmain QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -QMAKE_MOC = $(TQTDIR)\bin\moc.exe +QMAKE_MOC = $(TQTDIR)\bin\tqmoc.exe QMAKE_UIC = $(TQTDIR)\bin\uic.exe QMAKE_IDC = $(TQTDIR)\bin\idc.exe diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf index 2c34fd1e3..3f182ef08 100644 --- a/mkspecs/win32-icc/qmake.conf +++ b/mkspecs/win32-icc/qmake.conf @@ -85,7 +85,7 @@ QMAKE_LIBS_QT_ENTRY = qtmain.lib QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib delayimp.lib QMAKE_LFLAGS_OPENGL = /DELAYLOAD:opengl32.dll -QMAKE_MOC = $(TQTDIR)\bin\moc.exe +QMAKE_MOC = $(TQTDIR)\bin\tqmoc.exe QMAKE_UIC = $(TQTDIR)\bin\uic.exe QMAKE_IDC = $(TQTDIR)\bin\idc.exe diff --git a/mkspecs/win32-msvc.net/qmake.conf b/mkspecs/win32-msvc.net/qmake.conf index 5da017bc9..9f597286a 100644 --- a/mkspecs/win32-msvc.net/qmake.conf +++ b/mkspecs/win32-msvc.net/qmake.conf @@ -85,7 +85,7 @@ QMAKE_LIBS_QT_ENTRY = qtmain.lib QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib QMAKE_LFLAGS_OPENGL = /DELAYLOAD:opengl32.dll -QMAKE_MOC = $(TQTDIR)\bin\moc.exe +QMAKE_MOC = $(TQTDIR)\bin\tqmoc.exe QMAKE_UIC = $(TQTDIR)\bin\uic.exe QMAKE_IDC = $(TQTDIR)\bin\idc.exe diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf index 488509131..49eba4171 100644 --- a/mkspecs/win32-msvc/qmake.conf +++ b/mkspecs/win32-msvc/qmake.conf @@ -85,7 +85,7 @@ QMAKE_LIBS_QT_ENTRY = qtmain.lib QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib delayimp.lib QMAKE_LFLAGS_OPENGL = /DELAYLOAD:opengl32.dll -QMAKE_MOC = $(TQTDIR)\bin\moc.exe +QMAKE_MOC = $(TQTDIR)\bin\tqmoc.exe QMAKE_UIC = $(TQTDIR)\bin\uic.exe QMAKE_IDC = $(TQTDIR)\bin\idc.exe diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index 10f5d1a5d..bacaffade 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -87,7 +87,7 @@ QMAKE_LIBS_QT_ENTRY = qtmain.lib QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib QMAKE_LFLAGS_OPENGL = /DELAYLOAD:opengl32.dll -QMAKE_MOC = $(TQTDIR)\bin\moc.exe +QMAKE_MOC = $(TQTDIR)\bin\tqmoc.exe QMAKE_UIC = $(TQTDIR)\bin\uic.exe QMAKE_IDC = $(TQTDIR)\bin\idc.exe diff --git a/qmake/book/qmake-commandreference.leaf b/qmake/book/qmake-commandreference.leaf index 9b0a1b964..965d96190 100644 --- a/qmake/book/qmake-commandreference.leaf +++ b/qmake/book/qmake-commandreference.leaf @@ -303,7 +303,7 @@ Defines the header files for the project. \e qmake will generate dependency information (unless -nodepend is specified on the \link #Commands command line \endlink) for the specified headers. \e qmake will also automatically detect if -\e moc is required by the classes in these headers, and add the +\e tqmoc is required by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the moc files. @@ -579,7 +579,7 @@ automatically be included in the project. For example: \code -YACCSOURCES = moc.y +YACCSOURCES = tqmoc.y \endcode @@ -694,7 +694,7 @@ On other platforms, this variable has different meaning, as noted below. This variable contains a list of header files that require some -sort of pre-compilation step (such as with moc). The value of this +sort of pre-compilation step (such as with tqmoc). The value of this variable is typically handled by \e qmake or \link #QMAKESPEC qmake.conf \endlink and rarely needs to be modified. @@ -880,7 +880,7 @@ to be modified. \target QMAKE_CLEAN \section3 QMAKE_CLEAN -This variable contains any files which are not generated files (such as moc and uic +This variable contains any files which are not generated files (such as tqmoc and tquic generated files) and object files that should be removed when using "make clean". @@ -2138,8 +2138,8 @@ For convenience there is also a method of customizing (UNIX) projects for generic new compilers (or even preprocessors). \code -new_moc.output = moc_${QMAKE_FILE_BASE}.cpp -new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} +new_moc.output = tqmoc_${QMAKE_FILE_BASE}.cpp +new_moc.commands = tqmoc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} new_moc.depends = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,," new_moc.input = NEW_HEADERS QMAKE_EXTRA_UNIX_COMPILERS += new_moc diff --git a/qmake/book/qmake-preface.leaf b/qmake/book/qmake-preface.leaf index f63d171c0..59230c092 100644 --- a/qmake/book/qmake-preface.leaf +++ b/qmake/book/qmake-preface.leaf @@ -15,4 +15,4 @@ uses \e qmake as the primary build tool for the TQt library, and for the tools supplied with Qt. \e qmake also takes care of Qt's special requirements, automatically -including build rules for \link moc.html moc\endlink and \e uic. +including build rules for \link tqmoc.html tqmoc\endlink and \e uic. diff --git a/qmake/book/qmake-tutorial.leaf b/qmake/book/qmake-tutorial.leaf index 81e21d18d..49f5f8560 100644 --- a/qmake/book/qmake-tutorial.leaf +++ b/qmake/book/qmake-tutorial.leaf @@ -72,7 +72,7 @@ you can set it in the project file: The final step is to set the \e CONFIG variable. Since this is a Qt application, we need to put 'qt' on the CONFIG line so that \e qmake will add the relevant libraries to be linked against and ensure that -build lines for \e moc and \e uic are included in the makefile. +build lines for \e tqmoc and \e tquic are included in the makefile. The finished project file should look like this: \code diff --git a/qmake/generators/mac/metrowerks_xml.cpp b/qmake/generators/mac/metrowerks_xml.cpp index a197b0e40..83e917bdf 100644 --- a/qmake/generators/mac/metrowerks_xml.cpp +++ b/qmake/generators/mac/metrowerks_xml.cpp @@ -453,7 +453,7 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) t << endl; file.close(); - if(mocAware()) { + if(tqmocAware()) { TQString mocs = project->first("MOCS"); TQFile mocfile(mocs); if(!mocfile.open(IO_WriteOnly)) { @@ -558,7 +558,7 @@ MetrowerksMakefileGenerator::init() if(project->first("TEMPLATE") == "lib") mocfile += project->isActiveConfig("staticlib") ? "_static" : "_shared"; project->variables()["MOCS"].append(mocfile + ".mocs"); - setMocAware(TRUE); + setTQMocAware(TRUE); } if(!project->isEmpty("FORMS")) { TQString uicfile = project->first("TARGET"); diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 99b10d3e4..c4c42343f 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -94,7 +94,7 @@ static bool createDir(const TQString& fullPath) MakefileGenerator::MakefileGenerator(TQMakeProject *p) : init_opath_already(FALSE), - init_already(FALSE), moc_aware(FALSE), + init_already(FALSE), tqmoc_aware(FALSE), no_io(FALSE), project(p) { } @@ -545,7 +545,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons } } } - if( mocAware() && //is it a moc file? + if( tqmocAware() && //is it a moc file? ( inc.endsWith(Option::cpp_ext.first()) || inc.endsWith(Option::cpp_moc_ext) ) || ( (Option::cpp_ext.first() != Option::h_moc_ext) && inc.endsWith(Option::h_moc_ext) )) { TQString mocs[] = { TQString("_HDRMOC"), TQString("_SRCMOC"), TQString::null }; @@ -944,8 +944,8 @@ MakefileGenerator::init() if(!found_cache_moc || !found_cache_dep) write_cache = TRUE; } - /* Do moc before dependency checking since some includes can come from - moc_*.cpp files */ + /* Do tqmoc before dependency checking since some includes can come from + tqmoc_*.cpp files */ if(found_cache_moc) { TQString fixed_file(fileFixify((*val_it), TQDir::currentDirPath(), Option::output_dir)); TQString moc = findMocDestination(fixed_file); @@ -960,7 +960,7 @@ MakefileGenerator::init() } } } - } else if(mocAware() && (sources[x] == "SOURCES" || sources[x] == "HEADERS") && + } else if(tqmocAware() && (sources[x] == "SOURCES" || sources[x] == "HEADERS") && (Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT || Option::mkfile::do_mocs)) { generateMocList((*val_it)); @@ -1199,7 +1199,7 @@ MakefileGenerator::init() Option::output_dir)); //moc files - if ( mocAware() ) { + if ( tqmocAware() ) { if(!project->isEmpty("MOC_DIR")) project->variables()["INCLUDEPATH"].append(project->first("MOC_DIR")); if ( Option::h_moc_ext == Option::cpp_ext.first() ) diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 763b57abe..c91acf79a 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -51,7 +51,7 @@ class MakefileGenerator { TQString spec; - bool init_opath_already, init_already, moc_aware, no_io; + bool init_opath_already, init_already, tqmoc_aware, no_io; TQStringList createObjectList(const TQString &var); TQString build_args(); TQString dependencyKey(const TQString &file) const; @@ -95,8 +95,8 @@ protected: void setNoIO(bool o); bool noIO() const; - void setMocAware(bool o); - bool mocAware() const; + void setTQMocAware(bool o); + bool tqmocAware() const; void logicWarn(const TQString &, const TQString &); virtual bool doDepends() const { return Option::mkfile::do_deps; } @@ -164,11 +164,11 @@ inline TQString MakefileGenerator::findMocDestination(const TQString &src_file) return TQString(""); } -inline void MakefileGenerator::setMocAware(bool o) -{ moc_aware = o; } +inline void MakefileGenerator::setTQMocAware(bool o) +{ tqmoc_aware = o; } -inline bool MakefileGenerator::mocAware() const -{ return moc_aware; } +inline bool MakefileGenerator::tqmocAware() const +{ return tqmoc_aware; } inline void MakefileGenerator::setNoIO(bool o) { no_io = o; } diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index dad6ca7d4..4a3b22785 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -244,7 +244,7 @@ UnixMakefileGenerator::init() project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_THREAD"]; } if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setTQMocAware(TRUE); TQString compile_flag = var("QMAKE_COMPILE_FLAG"); if(compile_flag.isEmpty()) compile_flag = "-c"; diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 347186d75..c117a2d29 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -687,7 +687,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) //moc itself shouldn't have this dependency - this is a little kludgy but it is //better than the alternative for now. TQString moc = project->first("QMAKE_MOC"), target = project->first("TARGET"), - moc_dir = "$(TQTDIR)/src/moc"; + moc_dir = "$(TQTDIR)/src/tqmoc"; if(!project->isEmpty("QMAKE_MOC_SRC")) moc_dir = project->first("QMAKE_MOC_SRC"); fixEnvVariables(target); @@ -777,7 +777,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) TQString clean_targets; t << "mocclean:" << "\n"; - if(mocAware()) { + if(tqmocAware()) { if(!objMoc.isEmpty() || !srcMoc.isEmpty() || moc_incremental) { if(!objMoc.isEmpty()) t << "\t-$(DEL_FILE) $(OBJMOC)" << '\n'; diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp index 61906de29..4e97ba527 100644 --- a/qmake/generators/win32/borland_bmake.cpp +++ b/qmake/generators/win32/borland_bmake.cpp @@ -557,7 +557,7 @@ BorlandMakefileGenerator::init() project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_RT"]; } if ( project->isActiveConfig("moc") ) { - setMocAware(TRUE); + setTQMocAware(TRUE); } project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; // Update -lname to name.lib, and -Ldir to diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 18aa73c21..e59e7e3a2 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -574,7 +574,7 @@ MingwMakefileGenerator::init() } if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setTQMocAware(TRUE); // add -L libs to libdir TQStringList &libs = project->variables()["QMAKE_LIBS"]; diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp index 910400315..988d4632d 100644 --- a/qmake/generators/win32/msvc_dsp.cpp +++ b/qmake/generators/win32/msvc_dsp.cpp @@ -227,7 +227,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t) mocpath = mocpath.replace( TQRegExp( "\\..*$" ), "" ) + " "; buildCmds += "\t" + mocpath + (*it) + " -o " + findMocDestination((*it)) + " \\\n"; createMOC = "\"" + findMocDestination((*it)) + "\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\n $(BuildCmds)\n\n"; - customDependencies += "\"$(TQTDIR)\\bin\\moc.exe\""; + customDependencies += "\"$(TQTDIR)\\bin\\tqmoc.exe\""; } if (!createMOC.isEmpty() || !compilePCH.isEmpty()) { bool doMOC = !createMOC.isEmpty(); @@ -462,7 +462,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t) uiHeadersDir = fpath; } - t << "USERDEP_" << base << "=\"$(TQTDIR)\\bin\\moc.exe\" \"$(TQTDIR)\\bin\\uic.exe\"" << endl << endl; + t << "USERDEP_" << base << "=\"$(TQTDIR)\\bin\\tqmoc.exe\" \"$(TQTDIR)\\bin\\tquic.exe\"" << endl << endl; TQString build = "\n\n# Begin Custom Build - Uic'ing " + base + "...\n" "InputPath=.\\" + base + "\n\n" "BuildCmds= \\\n\t" + uicpath + base + @@ -818,7 +818,7 @@ DspMakefileGenerator::init() TQString targetfilename = project->variables()["TARGET"].first(); project->variables()["TARGET"].first() += project->first("TARGET_EXT"); if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setTQMocAware(TRUE); project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; project->variables()["QMAKE_FILETAGS"] += TQStringList::split(' ', diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 302e2532d..b95289f89 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -653,7 +653,7 @@ NmakeMakefileGenerator::init() if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setTQMocAware(TRUE); project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; TQStringList &libList = project->variables()["QMAKE_LIBS"]; diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index f22c0c148..df6001580 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1214,7 +1214,7 @@ void VcprojGenerator::initOld() // MOC ----------------------------------------------------------- if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setTQMocAware(TRUE); // /VERSION:x.yz ------------------------------------------------- if ( !project->variables()["VERSION"].isEmpty() ) { diff --git a/src/kernel/tqmetaobject.cpp b/src/kernel/tqmetaobject.cpp index 06fd7c86f..4e5686295 100644 --- a/src/kernel/tqmetaobject.cpp +++ b/src/kernel/tqmetaobject.cpp @@ -109,7 +109,7 @@ The number of pairs is returned by numClassInfo(), and values are returned by classInfo(). - \sa \link moc.html moc (Meta Object Compiler)\endlink + \sa \link tqmoc.html tqmoc (Meta Object Compiler)\endlink */ @@ -118,7 +118,7 @@ The private object. *****************************************************************************/ -// extra flags from moc.y +// extra flags from tqmoc.y enum Flags { Invalid = 0x00000000, Readable = 0x00000001, @@ -660,7 +660,7 @@ const TQMetaProperty* TQMetaObject::resolveProperty( const TQMetaProperty* p ) c \overload - The version of resolveProperty that is used by moc generated code + The version of resolveProperty that is used by tqmoc generated code */ int TQMetaObject::resolveProperty( int index ) const @@ -1197,7 +1197,7 @@ bool TQMetaProperty::reset( TQObject* o ) const #endif // TQT_NO_PROPERTIES /* - * TQMetaObjectCleanUp is used as static global object in the moc-generated cpp + * TQMetaObjectCleanUp is used as static global object in the tqmoc-generated cpp * files and deletes the TQMetaObject provided with setMetaObject. It sets the * TQObject reference to the metaObj to NULL when it is destroyed. */ diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp index 3c0b0f3ba..85c69f8ba 100644 --- a/src/kernel/tqobject.cpp +++ b/src/kernel/tqobject.cpp @@ -388,7 +388,7 @@ TQMetaCallEvent::~TQMetaCallEvent() Notice that the TQ_OBJECT macro is mandatory for any object that implements signals, slots or properties. You also need to run the - \link moc.html moc program (Meta Object Compiler) \endlink on the + \link tqmoc.html tqmoc program (Meta Object Compiler) \endlink on the source file. We strongly recommend the use of this macro in \e all subclasses of TQObject regardless of whether or not they actually use signals, slots and properties, since failure to do so may lead @@ -3219,7 +3219,7 @@ TQVariant TQObject::property( const char *name ) const className(), name ); return v; } - TQObject* that = (TQObject*) this; // moc ensures constness for the tqt_property call + TQObject* that = (TQObject*) this; // tqmoc ensures constness for the tqt_property call that->tqt_property( id, 1, &v ); return v; } diff --git a/src/kernel/tqobjectdefs.h b/src/kernel/tqobjectdefs.h index 422299850..69d44d6bc 100644 --- a/src/kernel/tqobjectdefs.h +++ b/src/kernel/tqobjectdefs.h @@ -71,7 +71,7 @@ #endif // The following macros are our "extensions" to C++ -// They are used, strictly speaking, only by the moc. +// They are used, strictly speaking, only by tqmoc. struct TQUObject; #ifdef QT_MOC_CPP diff --git a/src/kernel/tqprocess_unix.cpp b/src/kernel/tqprocess_unix.cpp index d85b64d71..b9a79afda 100644 --- a/src/kernel/tqprocess_unix.cpp +++ b/src/kernel/tqprocess_unix.cpp @@ -1345,7 +1345,7 @@ void TQProcess::flushStdin() } /* - This private slot is only used under Windows (but moc does not know about #if + This private slot is only used under Windows (but tqmoc does not know about #if defined()). */ void TQProcess::timeout() diff --git a/src/kernel/tqt.h b/src/kernel/tqt.h index 665f07b1a..b4aa2c6d6 100644 --- a/src/kernel/tqt.h +++ b/src/kernel/tqt.h @@ -26,7 +26,4 @@ Boston, MA 02110-1301, USA. #define Qt TQt -#define tqmoc moc -#define TQMOC MOC - #endif /* TQT_H */ diff --git a/src/kernel/tqvariant.cpp b/src/kernel/tqvariant.cpp index e400dbd07..71175edac 100644 --- a/src/kernel/tqvariant.cpp +++ b/src/kernel/tqvariant.cpp @@ -984,10 +984,10 @@ void TQVariant::clear() /* Attention! - For dependency reasons, this table is duplicated in moc.y. If you + For dependency reasons, this table is duplicated in tqmoc.y. If you change one, change both. - (Search for the word 'Attention' in moc.y.) + (Search for the word 'Attention' in tqmoc.y.) */ static const int ntypes = 35; static const char* const type_map[ntypes] = diff --git a/src/tmp/README b/src/tmp/README index d9f9bac27..fb1136b5c 100644 --- a/src/tmp/README +++ b/src/tmp/README @@ -1 +1 @@ -This is a temporary directory for moc output +This is a temporary directory for tqmoc output diff --git a/src/moc/README b/src/tqmoc/README index 4105ba68b..988b2004d 100644 --- a/src/moc/README +++ b/src/tqmoc/README @@ -1,10 +1,10 @@ This directory contains the source code for the TQt Meta Object -Compiler (moc). +Compiler (tqmoc). -The files moc_yacc.cpp, moc_yacc.h and moc_lex.cpp are generated by -lex and yacc from moc.l and moc.y. +The files tqmoc_yacc.cpp, tqmoc_yacc.h and tqmoc_lex.cpp are generated by +lex and yacc from tqmoc.l and tqmoc.y. -To compile the moc program from scratch, you need lex and yacc. These +To compile the tqmoc program from scratch, you need lex and yacc. These tools are preinstalled on most Unix systems, often as symbolic links to flex and byacc or bison. diff --git a/src/moc/moc.l b/src/tqmoc/tqmoc.l index b5388077f..373c6712c 100644 --- a/src/moc/moc.l +++ b/src/tqmoc/tqmoc.l @@ -39,9 +39,9 @@ *****************************************************************************/ %{ -#ifdef MOC_YACC_CODE +#ifdef TQMOC_YACC_CODE -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN #ifdef Q_OS_MAC9 # define isascii(c) ((int)( (unsigned int) (c) <= (unsigned char)0x7F )) #endif @@ -102,7 +102,7 @@ class TQString; extern void addExpressionChar( const char ); extern void addExpressionString( const char * ); -extern void moc_warn( const char *msg ); +extern void tqmoc_warn( const char *msg ); %} %start OUTSIDE QT_DEF IN_CLASS IN_NAMESPACE IN_ENUM IN_EXPR IN_DEF_ARG IN_FCT IN_TEMPL_ARGS GIMME_SEMICOLON SKIP IN_PROPERTY IN_CLASSINFO @@ -148,7 +148,7 @@ STRING {ALMOSTSTRING}\" if ( classPLevel == 1 ) return TQ_OBJECT; else if ( classPLevel > 1 ) - moc_warn( "Cannot use TQ_OBJECT in nested class." ); + tqmoc_warn( "Cannot use TQ_OBJECT in nested class." ); } <IN_CLASS>"TQ_PROPERTY" { X;if( classPLevel == 1 ) return TQ_PROPERTY; } <IN_CLASS>"TQ_OVERRIDE" { X;if( classPLevel == 1 ) return TQ_OVERRIDE; } @@ -443,7 +443,7 @@ STRING {ALMOSTSTRING}\" } else if ( s.contains( "MOC_SKIP_END" ) ) { if ( skipLevel == 0 ) { - moc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); + tqmoc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); } else { skipLevel--; if ( skipLevel == 0 ) { @@ -495,4 +495,4 @@ STRING {ALMOSTSTRING}\" %% -#endif // MOC_YACC_CODE +#endif // TQMOC_YACC_CODE diff --git a/src/moc/moc.pro b/src/tqmoc/tqmoc.pro index b8ff335d7..2a430efee 100644 --- a/src/moc/moc.pro +++ b/src/tqmoc/tqmoc.pro @@ -39,10 +39,10 @@ SOURCES = ../tools/tqbuffer.cpp \ ../codecs/tqutfcodec.cpp isEmpty(QT_PRODUCT)|contains(QT_PRODUCT, qt-internal) { - LEXSOURCES = moc.l - YACCSOURCES = moc.y + LEXSOURCES = tqmoc.l + YACCSOURCES = tqmoc.y } else { - SOURCES += moc_yacc.cpp + SOURCES += tqmoc_yacc.cpp } unix:SOURCES += ../tools/tqfile_unix.cpp ../tools/tqdir_unix.cpp ../tools/tqfileinfo_unix.cpp @@ -57,7 +57,7 @@ INSTALLS += target TARGET = McMoc CONFIG -= static CONFIG += shared plugin - DEFINES += MOC_MWERKS_PLUGIN + DEFINES += TQMOC_MWERKS_PLUGIN MWERKSDIR = $QT_SOURCE_TREE/util/mwerks_plugin INCLUDEPATH += $$MWERKSDIR/Headers LIBS += $$MWERKSDIR/Libraries/PluginLib4.shlb diff --git a/src/moc/moc.y b/src/tqmoc/tqmoc.y index 7eb667842..3309ee7b6 100644 --- a/src/moc/moc.y +++ b/src/tqmoc/tqmoc.y @@ -55,7 +55,7 @@ *****************************************************************************/ %{ -#define MOC_YACC_CODE +#define TQMOC_YACC_CODE void yyerror( const char *msg ); #include "qplatformdefs.h" @@ -67,7 +67,7 @@ void yyerror( const char *msg ); #include "tqptrlist.h" #include "tqregexp.h" #include "tqstrlist.h" -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN # ifdef Q_OS_MACX # undef OLD_DEBUG # ifdef DEBUG @@ -108,9 +108,9 @@ static void selectOutsideClassState(); static void registerClassInNamespace(); static bool suppress_func_warn = FALSE; static void func_warn( const char *msg ); -static void moc_warn( const char *msg ); -static void moc_err( const char *s ); -static void moc_err( const char *s1, const char *s2 ); +static void tqmoc_warn( const char *msg ); +static void tqmoc_err( const char *s ); +static void tqmoc_err( const char *s1, const char *s2 ); static void operatorError(); static void checkPropertyName( const char* ident ); @@ -681,8 +681,8 @@ extern "C" int hack_isatty( int ) # endif # define YYDEBUG 1 -# include "moc_yacc.h" -# include "moc_lex.cpp" +# include "tqmoc_yacc.h" +# include "tqmoc_lex.cpp" #endif //YYBISON %} @@ -1236,7 +1236,7 @@ obj_member_list: obj_member_list obj_member_area qt_access_specifier: access_specifier { tmpAccess = $1; } - | SLOTS { moc_err( "Missing access specifier" + | SLOTS { tqmoc_err( "Missing access specifier" " before \"slots:\"." ); } ; @@ -1246,7 +1246,7 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; } ':' opt_signal_declarations | TQ_OBJECT { if ( tmpAccess ) - moc_warn("TQ_OBJECT is not in the private" + tqmoc_warn("TQ_OBJECT is not in the private" " section of the class.\n" "TQ_OBJECT is a macro that resets" " access permission to \"private\"."); @@ -1287,7 +1287,7 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; } opt_property_candidates ; -slot_area: SIGNALS ':' { moc_err( "Signals cannot " +slot_area: SIGNALS ':' { tqmoc_err( "Signals cannot " "have access specifiers" ); } | SLOTS ':' opt_slot_declarations | ':' { if ( tmpAccess == Public && TQ_PROPERTYdetected ) @@ -1302,7 +1302,7 @@ slot_area: SIGNALS ':' { moc_err( "Signals cannot " } | IDENTIFIER { BEGIN IN_CLASS; if ( classPLevel != 1 ) - moc_warn( "unexpected access" + tqmoc_warn( "unexpected access" "specifier" ); } ; @@ -1488,7 +1488,7 @@ signal_or_slot: type_and_name fct_decl opt_semicolons { func_warn("Unexpected using declaration."); } | NAMESPACE IDENTIFIER '{' { classPLevel++; - moc_err("Unexpected namespace declaration."); } + tqmoc_err("Unexpected namespace declaration."); } | nested_class_head ';' opt_semicolons { func_warn("Unexpected class declaration.");} | nested_class_head @@ -1570,14 +1570,14 @@ property: IDENTIFIER IDENTIFIER prop_statements { if ( g->propRead.isEmpty() && !g->propOverride ) - moc_err( "A property must at least feature a read method." ); + tqmoc_err( "A property must at least feature a read method." ); checkPropertyName( $2 ); TQ_PROPERTYdetected = TRUE; // Avoid duplicates for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) { if ( lit.current()->name == $2 ) { if ( displayWarnings ) - moc_err( "Property '%s' defined twice.", + tqmoc_err( "Property '%s' defined twice.", (const char*)lit.current()->name ); } } @@ -1619,7 +1619,7 @@ extern "C" int hack_isatty( int ) # else # include <unistd.h> # endif -# include "moc_lex.cpp" +# include "tqmoc_lex.cpp" #endif //YYBISON void cleanup(); @@ -1673,7 +1673,7 @@ void setDefaultIncludeFile() #define ErrorFormatString "%s:%d:" #endif -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN int main( int argc, char **argv ) { init(); @@ -1771,21 +1771,21 @@ int main( int argc, char **argv ) } else if ( argc < 2 || error ) { // incomplete/wrong args fprintf( stderr, "TQt meta object compiler\n" ); if ( error ) - fprintf( stderr, "moc: %s\n", error ); - fprintf( stderr, "Usage: moc [options] <header-file>\n" + fprintf( stderr, "tqmoc: %s\n", error ); + fprintf( stderr, "Usage: tqmoc [options] <header-file>\n" "\t-o file Write output to file rather than stdout\n" "\t-f[file] Force #include, optional file name\n" "\t-p path Path prefix for included file\n" "\t-i Do not generate an #include statement\n" "\t-k Do not stop on errors\n" "\t-nw Do not display warnings\n" - "\t-v Display version of moc\n" ); + "\t-v Display version of tqmoc\n" ); cleanup(); return 1; } else { yyin = fopen( (const char *)g->fileName, "r" ); if ( !yyin ) { - fprintf( stderr, "moc: %s: No such file\n", (const char*)g->fileName); + fprintf( stderr, "tqmoc: %s: No such file\n", (const char*)g->fileName); cleanup(); return 1; } @@ -1793,7 +1793,7 @@ int main( int argc, char **argv ) if ( !g->outputFile.isEmpty() ) { // output file specified out = fopen( (const char *)g->outputFile, "w" ); // create output file if ( !out ) { - fprintf( stderr, "moc: Cannot create %s\n", + fprintf( stderr, "tqmoc: Cannot create %s\n", (const char*)g->outputFile ); cleanup(); return 1; @@ -1835,7 +1835,7 @@ const unsigned char *p_str(const char *, int =-1); CWPluginContext g_ctx; -moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) +tqmoc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) { init(); @@ -1853,7 +1853,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f fi.isdependentoffile = kCurrentCompiledFile; if(CWFindAndLoadFile( ctx, fin.data(), &fi) != cwNoErr) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(dspec) { @@ -1872,7 +1872,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f char tmp[sizeof(Str63)+2]; if(NewAlias( NULL, &fi.filespec, &alias) != noErr) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } for(;;) { GetAliasInfo(alias, x++, str); @@ -1889,18 +1889,18 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f struct stat istat, ostat; if(stat(inpath, &istat) == -1) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(stat(outpath, &ostat) == 0 && istat.st_mtime < ostat.st_mtime) { cleanup(); - return moc_not_time; + return tqmoc_not_time; } unlink(outpath.data()); out = fopen(outpath.data(), "w+"); if(!out) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } yyparse(); @@ -1909,13 +1909,13 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f if(g->mocError || !g->generatedCode) { unlink(outpath.data()); - moc_status ret = !g->generatedCode ? moc_no_qobject : moc_parse_error; + tqmoc_status ret = !g->generatedCode ? tqmoc_no_qobject : tqmoc_parse_error; cleanup(); return ret; } cleanup(); - return moc_success; + return tqmoc_success; } #endif void replace( char *s, char c1, char c2 ) @@ -1996,7 +1996,7 @@ void init() // initialize tmpFunc = new Function; tmpEnum = new Enum; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN buf_buffer = NULL; buf_index = 0; buf_size_total = 0; @@ -2008,7 +2008,7 @@ void cleanup() delete g; g = NULL; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN if(buf_buffer && g_ctx) CWReleaseFileText(g_ctx, buf_buffer); #endif @@ -2191,7 +2191,7 @@ void addExpressionChar( const char c ) void yyerror( const char *msg ) // print yacc error message { g->mocError = TRUE; -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN fprintf( stderr, ErrorFormatString" Error: %s\n", g->fileName.data(), lineNo, msg ); #else char msg2[200]; @@ -2205,25 +2205,25 @@ void yyerror( const char *msg ) // print yacc error message } } -void moc_err( const char *s ) +void tqmoc_err( const char *s ) { yyerror( s ); } -void moc_err( const char *s1, const char *s2 ) +void tqmoc_err( const char *s1, const char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); yyerror( tmp ); } -void moc_warn( const char *msg ) +void tqmoc_warn( const char *msg ) { if ( displayWarnings ) fprintf( stderr, ErrorFormatString" Warning: %s\n", g->fileName.data(), lineNo, msg); } -void moc_warn( char *s1, char *s2 ) +void tqmoc_warn( char *s1, char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); @@ -2234,14 +2234,14 @@ void moc_warn( char *s1, char *s2 ) void func_warn( const char *msg ) { if ( !suppress_func_warn ) - moc_warn( msg ); + tqmoc_warn( msg ); skipFunc = TRUE; } void operatorError() { if ( !suppress_func_warn ) - moc_warn("Operator functions cannot be signals or slots."); + tqmoc_warn("Operator functions cannot be signals or slots."); skipFunc = TRUE; } @@ -2732,7 +2732,7 @@ int generateProps() // if ( g->props.count() ) { if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains properties" + tqmoc_err("The declaration of the class \"%s\" contains properties" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, "#ifndef TQT_NO_PROPERTIES\n" ); @@ -2814,7 +2814,7 @@ int generateClassInfos() return 0; if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains class infos" + tqmoc_err("The declaration of the class \"%s\" contains class infos" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, " static const TQClassInfo classinfo_tbl[] = {\n" ); @@ -2845,17 +2845,17 @@ void generateClass() // generate C++ source code for a class if ( g->signals.count() == 0 && g->slots.count() == 0 && g->props.count() == 0 && g->infos.count() == 0 ) return; if ( displayWarnings && (g->signals.count() + g->slots.count()) != 0 ) - moc_err("The declaration of the class \"%s\" contains signals " + tqmoc_err("The declaration of the class \"%s\" contains signals " "or slots\n\t but no TQ_OBJECT macro.", g->className.data()); } else { if ( g->superClassName.isEmpty() ) - moc_err("The declaration of the class \"%s\" contains the\n" + tqmoc_err("The declaration of the class \"%s\" contains the\n" "\tTQ_OBJECT macro but does not inherit from any class!\n" "\tInherit from TQObject or one of its descendants" " or remove TQ_OBJECT.", g->className.data() ); } if ( templateClass ) { // don't generate for class - moc_err( "Sorry, TQt does not support templates that contain\n" + tqmoc_err( "Sorry, TQt does not support templates that contain\n" "\tsignals, slots or TQ_OBJECT." ); return; } @@ -2908,9 +2908,9 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#include <%sntqapplication.h>\n\n", (const char*)g->qtPath ); fprintf( out, "#include <%sprivate/tqucomextra_p.h>\n", (const char*)g->qtPath ); fprintf( out, "#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != %d)\n", formatRevision ); - fprintf( out, "#error \"This file was generated using the moc from %s." + fprintf( out, "#error \"This file was generated using the tqmoc from %s." " It\"\n#error \"cannot be used with the include files from" - " this version of TQt.\"\n#error \"(The moc has changed too" + " this version of TQt.\"\n#error \"(TQMoc has changed too" " much.)\"\n", TQT_VERSION_STR ); fprintf( out, "#endif\n\n" ); } else { @@ -3540,7 +3540,7 @@ void addEnum() if ( lit.current()->name == tmpEnum->name ) { if ( displayWarnings ) - moc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); + tqmoc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); } } @@ -3601,7 +3601,7 @@ void addMember( Member m ) void checkPropertyName( const char* ident ) { if ( ident[0] == '_' ) { - moc_err( "Invalid property name '%s'.", ident ); + tqmoc_err( "Invalid property name '%s'.", ident ); return; } } diff --git a/src/moc/moc_lex.cpp b/src/tqmoc/tqmoc_lex.cpp index 0fcd62c21..aba3d5b48 100644 --- a/src/moc/moc_lex.cpp +++ b/src/tqmoc/tqmoc_lex.cpp @@ -984,9 +984,9 @@ char *yytext; ** *****************************************************************************/ #line 42 "moc.l" -#ifdef MOC_YACC_CODE +#ifdef TQMOC_YACC_CODE -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN #ifdef Q_OS_MAC9 # define isascii(c) ((int)( (unsigned int) (c) <= (unsigned char)0x7F )) #endif @@ -1047,7 +1047,7 @@ class TQString; extern void addExpressionChar( const char ); extern void addExpressionString( const char * ); -extern void moc_warn( const char *msg ); +extern void tqmoc_warn( const char *msg ); #line 1053 "lex.yy.c" @@ -1465,7 +1465,7 @@ YY_RULE_SETUP if ( classPLevel == 1 ) return TQ_OBJECT; else if ( classPLevel > 1 ) - moc_warn( "Cannot use TQ_OBJECT in nested class." ); + tqmoc_warn( "Cannot use TQ_OBJECT in nested class." ); } YY_BREAK case 24: @@ -2180,7 +2180,7 @@ YY_RULE_SETUP } else if ( s.contains( "MOC_SKIP_END" ) ) { if ( skipLevel == 0 ) { - moc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); + tqmoc_warn(" MOC_SKIP_END without MOC_SKIP_BEGIN"); } else { skipLevel--; if ( skipLevel == 0 ) { @@ -3311,5 +3311,5 @@ void yyfree (void * ptr ) -#endif // MOC_YACC_CODE +#endif // TQMOC_YACC_CODE diff --git a/src/moc/moc_yacc.cpp b/src/tqmoc/tqmoc_yacc.cpp index 83994e260..ea0f36a2d 100644 --- a/src/moc/moc_yacc.cpp +++ b/src/tqmoc/tqmoc_yacc.cpp @@ -66,9 +66,9 @@ /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ -#line 57 "moc.y" +#line 57 "tqmoc.y" -#define MOC_YACC_CODE +#define TQMOC_YACC_CODE void yyerror( const char *msg ); #include "qplatformdefs.h" @@ -80,7 +80,7 @@ void yyerror( const char *msg ); #include "tqptrlist.h" #include "tqregexp.h" #include "tqstrlist.h" -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN # ifdef Q_OS_MACX # undef OLD_DEBUG # ifdef DEBUG @@ -121,9 +121,9 @@ static void selectOutsideClassState(); static void registerClassInNamespace(); static bool suppress_func_warn = FALSE; static void func_warn( const char *msg ); -static void moc_warn( const char *msg ); -static void moc_err( const char *s ); -static void moc_err( const char *s1, const char *s2 ); +static void tqmoc_warn( const char *msg ); +static void tqmoc_err( const char *s ); +static void tqmoc_err( const char *s1, const char *s2 ); static void operatorError(); static void checkPropertyName( const char* ident ); @@ -694,13 +694,13 @@ extern "C" int hack_isatty( int ) # endif # define YYDEBUG 1 -# include "moc_yacc.h" -# include "moc_lex.cpp" +# include "tqmoc_yacc.h" +# include "tqmoc_lex.cpp" #endif //YYBISON /* Line 268 of yacc.c */ -#line 704 "moc_yacc" +#line 704 "tqmoc_yacc" /* Enabling traces. */ #ifndef YYDEBUG @@ -847,7 +847,7 @@ typedef union YYSTYPE { /* Line 293 of yacc.c */ -#line 692 "moc.y" +#line 692 "tqmoc.y" char char_val; int int_val; @@ -861,7 +861,7 @@ typedef union YYSTYPE /* Line 293 of yacc.c */ -#line 865 "moc_yacc" +#line 865 "tqmoc_yacc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -873,7 +873,7 @@ typedef union YYSTYPE /* Line 343 of yacc.c */ -#line 877 "moc_yacc" +#line 877 "tqmoc_yacc" #ifdef short # undef short @@ -2655,21 +2655,21 @@ yyreduce: case 11: /* Line 1806 of yacc.c */ -#line 824 "moc.y" +#line 824 "tqmoc.y" { enterNameSpace((yyvsp[(2) - (2)].string)); } break; case 12: /* Line 1806 of yacc.c */ -#line 825 "moc.y" +#line 825 "tqmoc.y" { BEGIN IN_NAMESPACE; } break; case 13: /* Line 1806 of yacc.c */ -#line 827 "moc.y" +#line 827 "tqmoc.y" { leaveNameSpace(); selectOutsideClassState(); } @@ -2678,21 +2678,21 @@ yyreduce: case 14: /* Line 1806 of yacc.c */ -#line 832 "moc.y" +#line 832 "tqmoc.y" { enterNameSpace(); } break; case 15: /* Line 1806 of yacc.c */ -#line 833 "moc.y" +#line 833 "tqmoc.y" { BEGIN IN_NAMESPACE; } break; case 16: /* Line 1806 of yacc.c */ -#line 835 "moc.y" +#line 835 "tqmoc.y" { leaveNameSpace(); selectOutsideClassState(); } @@ -2701,42 +2701,42 @@ yyreduce: case 18: /* Line 1806 of yacc.c */ -#line 844 "moc.y" +#line 844 "tqmoc.y" { selectOutsideClassState(); } break; case 19: /* Line 1806 of yacc.c */ -#line 848 "moc.y" +#line 848 "tqmoc.y" { selectOutsideClassState(); } break; case 20: /* Line 1806 of yacc.c */ -#line 851 "moc.y" +#line 851 "tqmoc.y" { selectOutsideClassState(); } break; case 21: /* Line 1806 of yacc.c */ -#line 852 "moc.y" +#line 852 "tqmoc.y" { selectOutsideClassState(); } break; case 22: /* Line 1806 of yacc.c */ -#line 855 "moc.y" +#line 855 "tqmoc.y" { initClass(); } break; case 23: /* Line 1806 of yacc.c */ -#line 856 "moc.y" +#line 856 "tqmoc.y" { generateClass(); registerClassInNamespace(); selectOutsideClassState(); } @@ -2745,21 +2745,21 @@ yyreduce: case 24: /* Line 1806 of yacc.c */ -#line 864 "moc.y" +#line 864 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 25: /* Line 1806 of yacc.c */ -#line 865 "moc.y" +#line 865 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 26: /* Line 1806 of yacc.c */ -#line 869 "moc.y" +#line 869 "tqmoc.y" { g->tmpExpression = rmWS( g->tmpExpression ); (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "<", g->tmpExpression, ">" ); } @@ -2768,7 +2768,7 @@ yyreduce: case 27: /* Line 1806 of yacc.c */ -#line 880 "moc.y" +#line 880 "tqmoc.y" { initExpression(); templLevel = 1; BEGIN IN_TEMPL_ARGS; } @@ -2777,7 +2777,7 @@ yyreduce: case 28: /* Line 1806 of yacc.c */ -#line 893 "moc.y" +#line 893 "tqmoc.y" { initExpression(); BEGIN IN_EXPR; } break; @@ -2785,14 +2785,14 @@ yyreduce: case 29: /* Line 1806 of yacc.c */ -#line 902 "moc.y" +#line 902 "tqmoc.y" { BEGIN IN_DEF_ARG; } break; case 30: /* Line 1806 of yacc.c */ -#line 905 "moc.y" +#line 905 "tqmoc.y" { initExpression(); BEGIN IN_ENUM; } break; @@ -2800,210 +2800,210 @@ yyreduce: case 31: /* Line 1806 of yacc.c */ -#line 911 "moc.y" +#line 911 "tqmoc.y" { (yyval.string) = ""; } break; case 32: /* Line 1806 of yacc.c */ -#line 912 "moc.y" +#line 912 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 33: /* Line 1806 of yacc.c */ -#line 913 "moc.y" +#line 913 "tqmoc.y" { (yyval.string) = ""; } break; case 34: /* Line 1806 of yacc.c */ -#line 914 "moc.y" +#line 914 "tqmoc.y" { skipFunc = TRUE; (yyval.string) = ""; } break; case 35: /* Line 1806 of yacc.c */ -#line 915 "moc.y" +#line 915 "tqmoc.y" { skipFunc = TRUE; (yyval.string) = ""; } break; case 36: /* Line 1806 of yacc.c */ -#line 919 "moc.y" +#line 919 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (3)].string),(yyvsp[(2) - (3)].string),(yyvsp[(3) - (3)].string)); } break; case 37: /* Line 1806 of yacc.c */ -#line 921 "moc.y" +#line 921 "tqmoc.y" { (yyval.string) = ""; } break; case 38: /* Line 1806 of yacc.c */ -#line 922 "moc.y" +#line 922 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 39: /* Line 1806 of yacc.c */ -#line 925 "moc.y" +#line 925 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 40: /* Line 1806 of yacc.c */ -#line 926 "moc.y" +#line 926 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 43: /* Line 1806 of yacc.c */ -#line 931 "moc.y" +#line 931 "tqmoc.y" { skipFunc = TRUE; } break; case 45: /* Line 1806 of yacc.c */ -#line 935 "moc.y" +#line 935 "tqmoc.y" { } break; case 46: /* Line 1806 of yacc.c */ -#line 936 "moc.y" +#line 936 "tqmoc.y" { } break; case 47: /* Line 1806 of yacc.c */ -#line 939 "moc.y" +#line 939 "tqmoc.y" { (yyval.string) = "const"; } break; case 48: /* Line 1806 of yacc.c */ -#line 940 "moc.y" +#line 940 "tqmoc.y" { (yyval.string) = "volatile"; } break; case 49: /* Line 1806 of yacc.c */ -#line 943 "moc.y" +#line 943 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 50: /* Line 1806 of yacc.c */ -#line 944 "moc.y" +#line 944 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 51: /* Line 1806 of yacc.c */ -#line 945 "moc.y" +#line 945 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 52: /* Line 1806 of yacc.c */ -#line 949 "moc.y" +#line 949 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 53: /* Line 1806 of yacc.c */ -#line 950 "moc.y" +#line 950 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 54: /* Line 1806 of yacc.c */ -#line 953 "moc.y" +#line 953 "tqmoc.y" { (yyval.string) = "char"; } break; case 55: /* Line 1806 of yacc.c */ -#line 954 "moc.y" +#line 954 "tqmoc.y" { (yyval.string) = "short"; } break; case 56: /* Line 1806 of yacc.c */ -#line 955 "moc.y" +#line 955 "tqmoc.y" { (yyval.string) = "int"; } break; case 57: /* Line 1806 of yacc.c */ -#line 956 "moc.y" +#line 956 "tqmoc.y" { (yyval.string) = "long"; } break; case 58: /* Line 1806 of yacc.c */ -#line 957 "moc.y" +#line 957 "tqmoc.y" { (yyval.string) = "signed"; } break; case 59: /* Line 1806 of yacc.c */ -#line 958 "moc.y" +#line 958 "tqmoc.y" { (yyval.string) = "unsigned"; } break; case 60: /* Line 1806 of yacc.c */ -#line 959 "moc.y" +#line 959 "tqmoc.y" { (yyval.string) = "float"; } break; case 61: /* Line 1806 of yacc.c */ -#line 960 "moc.y" +#line 960 "tqmoc.y" { (yyval.string) = "double"; } break; case 62: /* Line 1806 of yacc.c */ -#line 961 "moc.y" +#line 961 "tqmoc.y" { (yyval.string) = "void"; } break; case 63: /* Line 1806 of yacc.c */ -#line 965 "moc.y" +#line 965 "tqmoc.y" { g->tmpExpression = rmWS( g->tmpExpression ); (yyval.string) = stradd( "template<", g->tmpExpression, ">" ); } @@ -3012,7 +3012,7 @@ yyreduce: case 65: /* Line 1806 of yacc.c */ -#line 971 "moc.y" +#line 971 "tqmoc.y" { templateClassOld = templateClass; templateClass = TRUE; } @@ -3021,77 +3021,77 @@ yyreduce: case 66: /* Line 1806 of yacc.c */ -#line 977 "moc.y" +#line 977 "tqmoc.y" { (yyval.string) = "class"; } break; case 67: /* Line 1806 of yacc.c */ -#line 978 "moc.y" +#line 978 "tqmoc.y" { (yyval.string) = "struct"; } break; case 68: /* Line 1806 of yacc.c */ -#line 981 "moc.y" +#line 981 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 69: /* Line 1806 of yacc.c */ -#line 983 "moc.y" +#line 983 "tqmoc.y" { (yyval.string) = stradd( "::", (yyvsp[(2) - (2)].string) ); } break; case 70: /* Line 1806 of yacc.c */ -#line 987 "moc.y" +#line 987 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (3)].string), "::", (yyvsp[(3) - (3)].string) );} break; case 71: /* Line 1806 of yacc.c */ -#line 988 "moc.y" +#line 988 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 72: /* Line 1806 of yacc.c */ -#line 992 "moc.y" +#line 992 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 73: /* Line 1806 of yacc.c */ -#line 993 "moc.y" +#line 993 "tqmoc.y" { (yyval.string) = stradd("enum ",(yyvsp[(2) - (2)].string)); } break; case 74: /* Line 1806 of yacc.c */ -#line 994 "moc.y" +#line 994 "tqmoc.y" { (yyval.string) = stradd("union ",(yyvsp[(2) - (2)].string)); } break; case 75: /* Line 1806 of yacc.c */ -#line 999 "moc.y" +#line 999 "tqmoc.y" { (yyval.arg_list) = (yyvsp[(1) - (2)].arg_list);} break; case 76: /* Line 1806 of yacc.c */ -#line 1000 "moc.y" +#line 1000 "tqmoc.y" { (yyval.arg_list) = (yyvsp[(1) - (3)].arg_list); func_warn("Ellipsis not supported" " in signals and slots.\n" @@ -3101,28 +3101,28 @@ yyreduce: case 77: /* Line 1806 of yacc.c */ -#line 1006 "moc.y" +#line 1006 "tqmoc.y" { (yyval.arg_list) = tmpArgList; } break; case 78: /* Line 1806 of yacc.c */ -#line 1007 "moc.y" +#line 1007 "tqmoc.y" { (yyval.arg_list) = (yyvsp[(1) - (1)].arg_list); } break; case 79: /* Line 1806 of yacc.c */ -#line 1010 "moc.y" +#line 1010 "tqmoc.y" { (yyval.arg) = 0; } break; case 82: /* Line 1806 of yacc.c */ -#line 1015 "moc.y" +#line 1015 "tqmoc.y" { func_warn("Ellipsis not supported" " in signals and slots.\n" "Ellipsis argument ignored."); } @@ -3131,91 +3131,91 @@ yyreduce: case 83: /* Line 1806 of yacc.c */ -#line 1023 "moc.y" +#line 1023 "tqmoc.y" { (yyval.arg_list) = addArg((yyvsp[(3) - (3)].arg)); } break; case 84: /* Line 1806 of yacc.c */ -#line 1024 "moc.y" +#line 1024 "tqmoc.y" { (yyval.arg_list) = addArg((yyvsp[(1) - (1)].arg)); } break; case 85: /* Line 1806 of yacc.c */ -#line 1028 "moc.y" +#line 1028 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)),""); } break; case 86: /* Line 1806 of yacc.c */ -#line 1030 "moc.y" +#line 1030 "tqmoc.y" { expLevel = 1; } break; case 87: /* Line 1806 of yacc.c */ -#line 1032 "moc.y" +#line 1032 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string)),"", 0, TRUE ); } break; case 88: /* Line 1806 of yacc.c */ -#line 1035 "moc.y" +#line 1035 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (4)].string),(yyvsp[(2) - (4)].string)),(yyvsp[(4) - (4)].string), (yyvsp[(3) - (4)].string)); } break; case 89: /* Line 1806 of yacc.c */ -#line 1038 "moc.y" +#line 1038 "tqmoc.y" { expLevel = 1; } break; case 90: /* Line 1806 of yacc.c */ -#line 1040 "moc.y" +#line 1040 "tqmoc.y" { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (7)].string),(yyvsp[(2) - (7)].string)),(yyvsp[(4) - (7)].string), (yyvsp[(3) - (7)].string), TRUE); } break; case 91: /* Line 1806 of yacc.c */ -#line 1044 "moc.y" +#line 1044 "tqmoc.y" { (yyval.string) = ""; } break; case 92: /* Line 1806 of yacc.c */ -#line 1045 "moc.y" +#line 1045 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 93: /* Line 1806 of yacc.c */ -#line 1049 "moc.y" +#line 1049 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 94: /* Line 1806 of yacc.c */ -#line 1050 "moc.y" +#line 1050 "tqmoc.y" { expLevel = 1; } break; case 95: /* Line 1806 of yacc.c */ -#line 1052 "moc.y" +#line 1052 "tqmoc.y" { (yyval.string) = stradd( "[", g->tmpExpression = g->tmpExpression.stripWhiteSpace(), "]" ); } @@ -3224,14 +3224,14 @@ yyreduce: case 96: /* Line 1806 of yacc.c */ -#line 1055 "moc.y" +#line 1055 "tqmoc.y" { expLevel = 1; } break; case 97: /* Line 1806 of yacc.c */ -#line 1057 "moc.y" +#line 1057 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (5)].string),"[", g->tmpExpression = g->tmpExpression.stripWhiteSpace(),"]" ); } @@ -3240,42 +3240,42 @@ yyreduce: case 98: /* Line 1806 of yacc.c */ -#line 1060 "moc.y" +#line 1060 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 99: /* Line 1806 of yacc.c */ -#line 1061 "moc.y" +#line 1061 "tqmoc.y" { (yyval.string) = (yyvsp[(2) - (3)].string); } break; case 100: /* Line 1806 of yacc.c */ -#line 1064 "moc.y" +#line 1064 "tqmoc.y" { (yyval.string) = ""; } break; case 101: /* Line 1806 of yacc.c */ -#line 1066 "moc.y" +#line 1066 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string));} break; case 102: /* Line 1806 of yacc.c */ -#line 1067 "moc.y" +#line 1067 "tqmoc.y" { expLevel = 1; } break; case 103: /* Line 1806 of yacc.c */ -#line 1069 "moc.y" +#line 1069 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (5)].string),"[", g->tmpExpression = g->tmpExpression.stripWhiteSpace(),"]" ); } @@ -3284,14 +3284,14 @@ yyreduce: case 104: /* Line 1806 of yacc.c */ -#line 1072 "moc.y" +#line 1072 "tqmoc.y" { (yyval.string) = (yyvsp[(2) - (3)].string); } break; case 106: /* Line 1806 of yacc.c */ -#line 1086 "moc.y" +#line 1086 "tqmoc.y" { tmpFunc->args = (yyvsp[(2) - (8)].arg_list); tmpFunc->qualifier = (yyvsp[(4) - (8)].string); } break; @@ -3299,154 +3299,154 @@ yyreduce: case 108: /* Line 1806 of yacc.c */ -#line 1092 "moc.y" +#line 1092 "tqmoc.y" { func_warn("Variable as signal or slot."); } break; case 109: /* Line 1806 of yacc.c */ -#line 1093 "moc.y" +#line 1093 "tqmoc.y" { expLevel=0; } break; case 110: /* Line 1806 of yacc.c */ -#line 1095 "moc.y" +#line 1095 "tqmoc.y" { skipFunc = TRUE; } break; case 111: /* Line 1806 of yacc.c */ -#line 1096 "moc.y" +#line 1096 "tqmoc.y" { expLevel=0; } break; case 112: /* Line 1806 of yacc.c */ -#line 1098 "moc.y" +#line 1098 "tqmoc.y" { skipFunc = TRUE; } break; case 113: /* Line 1806 of yacc.c */ -#line 1102 "moc.y" +#line 1102 "tqmoc.y" { expLevel = 1; } break; case 115: /* Line 1806 of yacc.c */ -#line 1104 "moc.y" +#line 1104 "tqmoc.y" { expLevel = 1; } break; case 117: /* Line 1806 of yacc.c */ -#line 1109 "moc.y" +#line 1109 "tqmoc.y" { (yyval.string) = ""; } break; case 118: /* Line 1806 of yacc.c */ -#line 1110 "moc.y" +#line 1110 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 119: /* Line 1806 of yacc.c */ -#line 1113 "moc.y" +#line 1113 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 120: /* Line 1806 of yacc.c */ -#line 1114 "moc.y" +#line 1114 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string));} break; case 121: /* Line 1806 of yacc.c */ -#line 1117 "moc.y" +#line 1117 "tqmoc.y" { (yyval.string) = straddSpc("*",(yyvsp[(2) - (2)].string));} break; case 122: /* Line 1806 of yacc.c */ -#line 1118 "moc.y" +#line 1118 "tqmoc.y" { (yyval.string) = stradd("&",(yyvsp[(2) - (2)].string));} break; case 123: /* Line 1806 of yacc.c */ -#line 1125 "moc.y" +#line 1125 "tqmoc.y" { (yyval.string) = ""; } break; case 124: /* Line 1806 of yacc.c */ -#line 1126 "moc.y" +#line 1126 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 125: /* Line 1806 of yacc.c */ -#line 1129 "moc.y" +#line 1129 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 126: /* Line 1806 of yacc.c */ -#line 1131 "moc.y" +#line 1131 "tqmoc.y" { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); } break; case 127: /* Line 1806 of yacc.c */ -#line 1134 "moc.y" +#line 1134 "tqmoc.y" { (yyval.string) = "const"; } break; case 128: /* Line 1806 of yacc.c */ -#line 1135 "moc.y" +#line 1135 "tqmoc.y" { (yyval.string) = "volatile"; } break; case 132: /* Line 1806 of yacc.c */ -#line 1143 "moc.y" +#line 1143 "tqmoc.y" { BEGIN IN_FCT; fctLevel = 1;} break; case 133: /* Line 1806 of yacc.c */ -#line 1144 "moc.y" +#line 1144 "tqmoc.y" { BEGIN QT_DEF; } break; case 134: /* Line 1806 of yacc.c */ -#line 1151 "moc.y" +#line 1151 "tqmoc.y" { BEGIN IN_CLASS; classPLevel = 1; } @@ -3455,14 +3455,14 @@ yyreduce: case 135: /* Line 1806 of yacc.c */ -#line 1155 "moc.y" +#line 1155 "tqmoc.y" { BEGIN QT_DEF; } break; case 136: /* Line 1806 of yacc.c */ -#line 1156 "moc.y" +#line 1156 "tqmoc.y" { BEGIN QT_DEF; /* -- " -- */ skipClass = TRUE; } break; @@ -3470,7 +3470,7 @@ yyreduce: case 137: /* Line 1806 of yacc.c */ -#line 1158 "moc.y" +#line 1158 "tqmoc.y" { BEGIN QT_DEF; /* -- " -- */ skipClass = TRUE; } break; @@ -3478,7 +3478,7 @@ yyreduce: case 138: /* Line 1806 of yacc.c */ -#line 1160 "moc.y" +#line 1160 "tqmoc.y" { BEGIN QT_DEF; /* -- " -- */ skipClass = TRUE; } break; @@ -3486,7 +3486,7 @@ yyreduce: case 139: /* Line 1806 of yacc.c */ -#line 1164 "moc.y" +#line 1164 "tqmoc.y" { BEGIN QT_DEF; /* catch ';' */ skipClass = TRUE; } break; @@ -3494,7 +3494,7 @@ yyreduce: case 140: /* Line 1806 of yacc.c */ -#line 1166 "moc.y" +#line 1166 "tqmoc.y" { skipClass = TRUE; BEGIN GIMME_SEMICOLON; } break; @@ -3502,14 +3502,14 @@ yyreduce: case 144: /* Line 1806 of yacc.c */ -#line 1173 "moc.y" +#line 1173 "tqmoc.y" { (yyval.string) = ""; } break; case 146: /* Line 1806 of yacc.c */ -#line 1179 "moc.y" +#line 1179 "tqmoc.y" { g->className = (yyvsp[(2) - (2)].string); if ( g->className == "TQObject" ) TQ_OBJECTdetected = TRUE; @@ -3519,7 +3519,7 @@ yyreduce: case 147: /* Line 1806 of yacc.c */ -#line 1185 "moc.y" +#line 1185 "tqmoc.y" { g->className = (yyvsp[(3) - (3)].string); if ( g->className == "TQObject" ) TQ_OBJECTdetected = TRUE; @@ -3529,74 +3529,74 @@ yyreduce: case 148: /* Line 1806 of yacc.c */ -#line 1192 "moc.y" +#line 1192 "tqmoc.y" { g->superClassName = (yyvsp[(2) - (2)].string); } break; case 149: /* Line 1806 of yacc.c */ -#line 1197 "moc.y" +#line 1197 "tqmoc.y" { templateClass = templateClassOld; } break; case 158: /* Line 1806 of yacc.c */ -#line 1220 "moc.y" +#line 1220 "tqmoc.y" { expLevel = 1; } break; case 160: /* Line 1806 of yacc.c */ -#line 1225 "moc.y" +#line 1225 "tqmoc.y" { (yyval.string) = 0; } break; case 161: /* Line 1806 of yacc.c */ -#line 1226 "moc.y" +#line 1226 "tqmoc.y" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 166: /* Line 1806 of yacc.c */ -#line 1238 "moc.y" +#line 1238 "tqmoc.y" { tmpAccess = (yyvsp[(1) - (1)].access); } break; case 167: /* Line 1806 of yacc.c */ -#line 1239 "moc.y" - { moc_err( "Missing access specifier" +#line 1239 "tqmoc.y" + { tqmoc_err( "Missing access specifier" " before \"slots:\"." ); } break; case 168: /* Line 1806 of yacc.c */ -#line 1243 "moc.y" +#line 1243 "tqmoc.y" { BEGIN QT_DEF; } break; case 170: /* Line 1806 of yacc.c */ -#line 1245 "moc.y" +#line 1245 "tqmoc.y" { BEGIN QT_DEF; } break; case 172: /* Line 1806 of yacc.c */ -#line 1247 "moc.y" +#line 1247 "tqmoc.y" { if ( tmpAccess ) - moc_warn("TQ_OBJECT is not in the private" + tqmoc_warn("TQ_OBJECT is not in the private" " section of the class.\n" "TQ_OBJECT is a macro that resets" " access permission to \"private\"."); @@ -3607,7 +3607,7 @@ yyreduce: case 173: /* Line 1806 of yacc.c */ -#line 1255 "moc.y" +#line 1255 "tqmoc.y" { tmpYYStart = YY_START; tmpPropOverride = FALSE; BEGIN IN_PROPERTY; } @@ -3616,7 +3616,7 @@ yyreduce: case 174: /* Line 1806 of yacc.c */ -#line 1258 "moc.y" +#line 1258 "tqmoc.y" { BEGIN tmpYYStart; } @@ -3625,7 +3625,7 @@ yyreduce: case 176: /* Line 1806 of yacc.c */ -#line 1262 "moc.y" +#line 1262 "tqmoc.y" { tmpYYStart = YY_START; tmpPropOverride = TRUE; BEGIN IN_PROPERTY; } @@ -3634,7 +3634,7 @@ yyreduce: case 177: /* Line 1806 of yacc.c */ -#line 1265 "moc.y" +#line 1265 "tqmoc.y" { BEGIN tmpYYStart; } @@ -3643,14 +3643,14 @@ yyreduce: case 179: /* Line 1806 of yacc.c */ -#line 1269 "moc.y" +#line 1269 "tqmoc.y" { tmpYYStart = YY_START; BEGIN IN_CLASSINFO; } break; case 180: /* Line 1806 of yacc.c */ -#line 1271 "moc.y" +#line 1271 "tqmoc.y" { g->infos.append( new ClassInfo( (yyvsp[(4) - (7)].string), (yyvsp[(6) - (7)].string) ) ); BEGIN tmpYYStart; @@ -3660,14 +3660,14 @@ yyreduce: case 182: /* Line 1806 of yacc.c */ -#line 1276 "moc.y" +#line 1276 "tqmoc.y" { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } break; case 183: /* Line 1806 of yacc.c */ -#line 1277 "moc.y" +#line 1277 "tqmoc.y" { TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; @@ -3677,14 +3677,14 @@ yyreduce: case 185: /* Line 1806 of yacc.c */ -#line 1282 "moc.y" +#line 1282 "tqmoc.y" { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } break; case 186: /* Line 1806 of yacc.c */ -#line 1283 "moc.y" +#line 1283 "tqmoc.y" { TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; @@ -3694,15 +3694,15 @@ yyreduce: case 188: /* Line 1806 of yacc.c */ -#line 1290 "moc.y" - { moc_err( "Signals cannot " +#line 1290 "tqmoc.y" + { tqmoc_err( "Signals cannot " "have access specifiers" ); } break; case 190: /* Line 1806 of yacc.c */ -#line 1293 "moc.y" +#line 1293 "tqmoc.y" { if ( tmpAccess == Public && TQ_PROPERTYdetected ) BEGIN QT_DEF; else @@ -3714,7 +3714,7 @@ yyreduce: case 191: /* Line 1806 of yacc.c */ -#line 1300 "moc.y" +#line 1300 "tqmoc.y" { suppress_func_warn = FALSE; } @@ -3723,10 +3723,10 @@ yyreduce: case 192: /* Line 1806 of yacc.c */ -#line 1303 "moc.y" +#line 1303 "tqmoc.y" { BEGIN IN_CLASS; if ( classPLevel != 1 ) - moc_warn( "unexpected access" + tqmoc_warn( "unexpected access" "specifier" ); } break; @@ -3734,161 +3734,161 @@ yyreduce: case 197: /* Line 1806 of yacc.c */ -#line 1318 "moc.y" +#line 1318 "tqmoc.y" { addMember( PropertyCandidateMember ); } break; case 202: /* Line 1806 of yacc.c */ -#line 1330 "moc.y" +#line 1330 "tqmoc.y" { addMember( SignalMember ); } break; case 207: /* Line 1806 of yacc.c */ -#line 1341 "moc.y" +#line 1341 "tqmoc.y" { addMember( SlotMember ); } break; case 210: /* Line 1806 of yacc.c */ -#line 1348 "moc.y" +#line 1348 "tqmoc.y" { (yyval.string)=(yyvsp[(2) - (2)].string); } break; case 211: /* Line 1806 of yacc.c */ -#line 1351 "moc.y" +#line 1351 "tqmoc.y" { g->multipleSuperClasses.append( (yyvsp[(3) - (3)].string) ); } break; case 213: /* Line 1806 of yacc.c */ -#line 1356 "moc.y" +#line 1356 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "(", (yyvsp[(3) - (4)].string), ")" ); } break; case 214: /* Line 1806 of yacc.c */ -#line 1358 "moc.y" +#line 1358 "tqmoc.y" { (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "(", (yyvsp[(3) - (4)].string), ")" ); } break; case 215: /* Line 1806 of yacc.c */ -#line 1361 "moc.y" +#line 1361 "tqmoc.y" {(yyval.string)=(yyvsp[(1) - (1)].string);} break; case 216: /* Line 1806 of yacc.c */ -#line 1362 "moc.y" +#line 1362 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 217: /* Line 1806 of yacc.c */ -#line 1363 "moc.y" +#line 1363 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 218: /* Line 1806 of yacc.c */ -#line 1364 "moc.y" +#line 1364 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 219: /* Line 1806 of yacc.c */ -#line 1365 "moc.y" +#line 1365 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 220: /* Line 1806 of yacc.c */ -#line 1366 "moc.y" +#line 1366 "tqmoc.y" {(yyval.string)=(yyvsp[(1) - (1)].string);} break; case 221: /* Line 1806 of yacc.c */ -#line 1367 "moc.y" +#line 1367 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 222: /* Line 1806 of yacc.c */ -#line 1368 "moc.y" +#line 1368 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 223: /* Line 1806 of yacc.c */ -#line 1369 "moc.y" +#line 1369 "tqmoc.y" {(yyval.string)=(yyvsp[(3) - (3)].string);} break; case 224: /* Line 1806 of yacc.c */ -#line 1370 "moc.y" +#line 1370 "tqmoc.y" {(yyval.string)=(yyvsp[(2) - (2)].string);} break; case 225: /* Line 1806 of yacc.c */ -#line 1373 "moc.y" +#line 1373 "tqmoc.y" { (yyval.access)=Private; } break; case 226: /* Line 1806 of yacc.c */ -#line 1374 "moc.y" +#line 1374 "tqmoc.y" { (yyval.access)=Protected; } break; case 227: /* Line 1806 of yacc.c */ -#line 1375 "moc.y" +#line 1375 "tqmoc.y" { (yyval.access)=Public; } break; case 228: /* Line 1806 of yacc.c */ -#line 1378 "moc.y" +#line 1378 "tqmoc.y" { } break; case 229: /* Line 1806 of yacc.c */ -#line 1379 "moc.y" +#line 1379 "tqmoc.y" { } break; case 271: /* Line 1806 of yacc.c */ -#line 1427 "moc.y" +#line 1427 "tqmoc.y" { tmpFunc->type = (yyvsp[(1) - (2)].string); tmpFunc->name = (yyvsp[(2) - (2)].string); } break; @@ -3896,7 +3896,7 @@ yyreduce: case 272: /* Line 1806 of yacc.c */ -#line 1430 "moc.y" +#line 1430 "tqmoc.y" { tmpFunc->type = "int"; tmpFunc->name = (yyvsp[(1) - (1)].string); if ( tmpFunc->name == g->className ) @@ -3908,7 +3908,7 @@ yyreduce: case 273: /* Line 1806 of yacc.c */ -#line 1437 "moc.y" +#line 1437 "tqmoc.y" { tmpFunc->type = "void"; tmpFunc->name = "~"; tmpFunc->name += (yyvsp[(3) - (3)].string); @@ -3920,7 +3920,7 @@ yyreduce: case 274: /* Line 1806 of yacc.c */ -#line 1445 "moc.y" +#line 1445 "tqmoc.y" { char *tmp = straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string),(yyvsp[(3) - (5)].string),(yyvsp[(4) - (5)].string)); @@ -3932,14 +3932,14 @@ yyreduce: case 275: /* Line 1806 of yacc.c */ -#line 1452 "moc.y" +#line 1452 "tqmoc.y" { skipFunc = TRUE; } break; case 276: /* Line 1806 of yacc.c */ -#line 1454 "moc.y" +#line 1454 "tqmoc.y" { tmpFunc->type = straddSpc((yyvsp[(1) - (3)].string),(yyvsp[(2) - (3)].string)); tmpFunc->name = (yyvsp[(3) - (3)].string); } @@ -3948,7 +3948,7 @@ yyreduce: case 277: /* Line 1806 of yacc.c */ -#line 1459 "moc.y" +#line 1459 "tqmoc.y" { tmpFunc->type = straddSpc((yyvsp[(1) - (4)].string),(yyvsp[(2) - (4)].string),(yyvsp[(3) - (4)].string)); tmpFunc->name = (yyvsp[(4) - (4)].string); } @@ -3957,92 +3957,92 @@ yyreduce: case 278: /* Line 1806 of yacc.c */ -#line 1463 "moc.y" +#line 1463 "tqmoc.y" { operatorError(); } break; case 279: /* Line 1806 of yacc.c */ -#line 1465 "moc.y" +#line 1465 "tqmoc.y" { operatorError(); } break; case 280: /* Line 1806 of yacc.c */ -#line 1468 "moc.y" +#line 1468 "tqmoc.y" { operatorError(); } break; case 281: /* Line 1806 of yacc.c */ -#line 1470 "moc.y" +#line 1470 "tqmoc.y" { operatorError(); } break; case 282: /* Line 1806 of yacc.c */ -#line 1473 "moc.y" +#line 1473 "tqmoc.y" { operatorError(); } break; case 284: /* Line 1806 of yacc.c */ -#line 1479 "moc.y" +#line 1479 "tqmoc.y" { func_warn("Unexpected variable declaration."); } break; case 285: /* Line 1806 of yacc.c */ -#line 1482 "moc.y" +#line 1482 "tqmoc.y" { func_warn("Unexpected variable declaration."); } break; case 286: /* Line 1806 of yacc.c */ -#line 1484 "moc.y" +#line 1484 "tqmoc.y" { func_warn("Unexpected enum declaration."); } break; case 287: /* Line 1806 of yacc.c */ -#line 1486 "moc.y" +#line 1486 "tqmoc.y" { func_warn("Unexpected using declaration."); } break; case 288: /* Line 1806 of yacc.c */ -#line 1488 "moc.y" +#line 1488 "tqmoc.y" { func_warn("Unexpected using declaration."); } break; case 289: /* Line 1806 of yacc.c */ -#line 1490 "moc.y" +#line 1490 "tqmoc.y" { classPLevel++; - moc_err("Unexpected namespace declaration."); } + tqmoc_err("Unexpected namespace declaration."); } break; case 290: /* Line 1806 of yacc.c */ -#line 1493 "moc.y" +#line 1493 "tqmoc.y" { func_warn("Unexpected class declaration.");} break; case 291: /* Line 1806 of yacc.c */ -#line 1495 "moc.y" +#line 1495 "tqmoc.y" { func_warn("Unexpected class declaration."); BEGIN IN_FCT; fctLevel=1; } @@ -4051,42 +4051,42 @@ yyreduce: case 292: /* Line 1806 of yacc.c */ -#line 1498 "moc.y" +#line 1498 "tqmoc.y" { BEGIN QT_DEF; } break; case 296: /* Line 1806 of yacc.c */ -#line 1507 "moc.y" +#line 1507 "tqmoc.y" { } break; case 297: /* Line 1806 of yacc.c */ -#line 1508 "moc.y" +#line 1508 "tqmoc.y" { expLevel = 0; } break; case 299: /* Line 1806 of yacc.c */ -#line 1510 "moc.y" +#line 1510 "tqmoc.y" { expLevel = 0; } break; case 302: /* Line 1806 of yacc.c */ -#line 1515 "moc.y" +#line 1515 "tqmoc.y" { expLevel = 0; } break; case 307: /* Line 1806 of yacc.c */ -#line 1530 "moc.y" +#line 1530 "tqmoc.y" { BEGIN QT_DEF; if ( tmpAccess == Public) { tmpEnum->name = (yyvsp[(1) - (5)].string); @@ -4098,42 +4098,42 @@ yyreduce: case 308: /* Line 1806 of yacc.c */ -#line 1537 "moc.y" +#line 1537 "tqmoc.y" { tmpEnum->clear();} break; case 310: /* Line 1806 of yacc.c */ -#line 1541 "moc.y" +#line 1541 "tqmoc.y" { } break; case 314: /* Line 1806 of yacc.c */ -#line 1549 "moc.y" +#line 1549 "tqmoc.y" { if ( tmpAccess == Public) tmpEnum->append( (yyvsp[(1) - (1)].string) ); } break; case 315: /* Line 1806 of yacc.c */ -#line 1550 "moc.y" +#line 1550 "tqmoc.y" { enumLevel=0; } break; case 316: /* Line 1806 of yacc.c */ -#line 1551 "moc.y" +#line 1551 "tqmoc.y" { if ( tmpAccess == Public) tmpEnum->append( (yyvsp[(1) - (4)].string) ); } break; case 317: /* Line 1806 of yacc.c */ -#line 1555 "moc.y" +#line 1555 "tqmoc.y" { g->propWrite = ""; g->propRead = ""; @@ -4154,17 +4154,17 @@ yyreduce: case 318: /* Line 1806 of yacc.c */ -#line 1571 "moc.y" +#line 1571 "tqmoc.y" { if ( g->propRead.isEmpty() && !g->propOverride ) - moc_err( "A property must at least feature a read method." ); + tqmoc_err( "A property must at least feature a read method." ); checkPropertyName( (yyvsp[(2) - (4)].string) ); TQ_PROPERTYdetected = TRUE; // Avoid duplicates for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) { if ( lit.current()->name == (yyvsp[(2) - (4)].string) ) { if ( displayWarnings ) - moc_err( "Property '%s' defined twice.", + tqmoc_err( "Property '%s' defined twice.", (const char*)lit.current()->name ); } } @@ -4178,77 +4178,77 @@ yyreduce: case 320: /* Line 1806 of yacc.c */ -#line 1592 "moc.y" +#line 1592 "tqmoc.y" { g->propRead = (yyvsp[(2) - (3)].string); } break; case 321: /* Line 1806 of yacc.c */ -#line 1593 "moc.y" +#line 1593 "tqmoc.y" { g->propWrite = (yyvsp[(2) - (3)].string); } break; case 322: /* Line 1806 of yacc.c */ -#line 1594 "moc.y" +#line 1594 "tqmoc.y" { g->propReset = (yyvsp[(2) - (3)].string); } break; case 323: /* Line 1806 of yacc.c */ -#line 1595 "moc.y" +#line 1595 "tqmoc.y" { g->propStored = (yyvsp[(2) - (3)].string); } break; case 324: /* Line 1806 of yacc.c */ -#line 1596 "moc.y" +#line 1596 "tqmoc.y" { g->propDesignable = (yyvsp[(2) - (3)].string); } break; case 325: /* Line 1806 of yacc.c */ -#line 1597 "moc.y" +#line 1597 "tqmoc.y" { g->propScriptable = (yyvsp[(2) - (3)].string); } break; case 326: /* Line 1806 of yacc.c */ -#line 1600 "moc.y" +#line 1600 "tqmoc.y" { } break; case 327: /* Line 1806 of yacc.c */ -#line 1601 "moc.y" +#line 1601 "tqmoc.y" { g->qtEnums.append( (yyvsp[(1) - (2)].string) ); } break; case 328: /* Line 1806 of yacc.c */ -#line 1604 "moc.y" +#line 1604 "tqmoc.y" { } break; case 329: /* Line 1806 of yacc.c */ -#line 1605 "moc.y" +#line 1605 "tqmoc.y" { g->qtSets.append( (yyvsp[(1) - (2)].string) ); } break; /* Line 1806 of yacc.c */ -#line 4252 "moc_yacc" +#line 4252 "tqmoc_yacc" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4479,7 +4479,7 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 1608 "moc.y" +#line 1608 "tqmoc.y" #ifndef YYBISON @@ -4494,7 +4494,7 @@ extern "C" int hack_isatty( int ) # else # include <unistd.h> # endif -# include "moc_lex.cpp" +# include "tqmoc_lex.cpp" #endif //YYBISON void cleanup(); @@ -4548,7 +4548,7 @@ void setDefaultIncludeFile() #define ErrorFormatString "%s:%d:" #endif -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN int main( int argc, char **argv ) { init(); @@ -4646,21 +4646,21 @@ int main( int argc, char **argv ) } else if ( argc < 2 || error ) { // incomplete/wrong args fprintf( stderr, "TQt meta object compiler\n" ); if ( error ) - fprintf( stderr, "moc: %s\n", error ); - fprintf( stderr, "Usage: moc [options] <header-file>\n" + fprintf( stderr, "tqmoc: %s\n", error ); + fprintf( stderr, "Usage: tqmoc [options] <header-file>\n" "\t-o file Write output to file rather than stdout\n" "\t-f[file] Force #include, optional file name\n" "\t-p path Path prefix for included file\n" "\t-i Do not generate an #include statement\n" "\t-k Do not stop on errors\n" "\t-nw Do not display warnings\n" - "\t-v Display version of moc\n" ); + "\t-v Display version of tqmoc\n" ); cleanup(); return 1; } else { yyin = fopen( (const char *)g->fileName, "r" ); if ( !yyin ) { - fprintf( stderr, "moc: %s: No such file\n", (const char*)g->fileName); + fprintf( stderr, "tqmoc: %s: No such file\n", (const char*)g->fileName); cleanup(); return 1; } @@ -4668,7 +4668,7 @@ int main( int argc, char **argv ) if ( !g->outputFile.isEmpty() ) { // output file specified out = fopen( (const char *)g->outputFile, "w" ); // create output file if ( !out ) { - fprintf( stderr, "moc: Cannot create %s\n", + fprintf( stderr, "tqmoc: Cannot create %s\n", (const char*)g->outputFile ); cleanup(); return 1; @@ -4710,7 +4710,7 @@ const unsigned char *p_str(const char *, int =-1); CWPluginContext g_ctx; -moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) +tqmoc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &fout, CWFileSpec *dspec, bool i) { init(); @@ -4728,7 +4728,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f fi.isdependentoffile = kCurrentCompiledFile; if(CWFindAndLoadFile( ctx, fin.data(), &fi) != cwNoErr) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(dspec) { @@ -4747,7 +4747,7 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f char tmp[sizeof(Str63)+2]; if(NewAlias( NULL, &fi.filespec, &alias) != noErr) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } for(;;) { GetAliasInfo(alias, x++, str); @@ -4764,18 +4764,18 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f struct stat istat, ostat; if(stat(inpath, &istat) == -1) { cleanup(); - return moc_no_source; + return tqmoc_no_source; } if(stat(outpath, &ostat) == 0 && istat.st_mtime < ostat.st_mtime) { cleanup(); - return moc_not_time; + return tqmoc_not_time; } unlink(outpath.data()); out = fopen(outpath.data(), "w+"); if(!out) { cleanup(); - return moc_general_error; + return tqmoc_general_error; } yyparse(); @@ -4784,13 +4784,13 @@ moc_status do_moc( CWPluginContext ctx, const TQCString &fin, const TQCString &f if(g->mocError || !g->generatedCode) { unlink(outpath.data()); - moc_status ret = !g->generatedCode ? moc_no_qobject : moc_parse_error; + tqmoc_status ret = !g->generatedCode ? tqmoc_no_qobject : tqmoc_parse_error; cleanup(); return ret; } cleanup(); - return moc_success; + return tqmoc_success; } #endif void replace( char *s, char c1, char c2 ) @@ -4871,7 +4871,7 @@ void init() // initialize tmpFunc = new Function; tmpEnum = new Enum; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN buf_buffer = NULL; buf_index = 0; buf_size_total = 0; @@ -4883,7 +4883,7 @@ void cleanup() delete g; g = NULL; -#ifdef MOC_MWERKS_PLUGIN +#ifdef TQMOC_MWERKS_PLUGIN if(buf_buffer && g_ctx) CWReleaseFileText(g_ctx, buf_buffer); #endif @@ -5066,7 +5066,7 @@ void addExpressionChar( const char c ) void yyerror( const char *msg ) // print yacc error message { g->mocError = TRUE; -#ifndef MOC_MWERKS_PLUGIN +#ifndef TQMOC_MWERKS_PLUGIN fprintf( stderr, ErrorFormatString" Error: %s\n", g->fileName.data(), lineNo, msg ); #else char msg2[200]; @@ -5080,25 +5080,25 @@ void yyerror( const char *msg ) // print yacc error message } } -void moc_err( const char *s ) +void tqmoc_err( const char *s ) { yyerror( s ); } -void moc_err( const char *s1, const char *s2 ) +void tqmoc_err( const char *s1, const char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); yyerror( tmp ); } -void moc_warn( const char *msg ) +void tqmoc_warn( const char *msg ) { if ( displayWarnings ) fprintf( stderr, ErrorFormatString" Warning: %s\n", g->fileName.data(), lineNo, msg); } -void moc_warn( char *s1, char *s2 ) +void tqmoc_warn( char *s1, char *s2 ) { static char tmp[1024]; sprintf( tmp, s1, s2 ); @@ -5109,14 +5109,14 @@ void moc_warn( char *s1, char *s2 ) void func_warn( const char *msg ) { if ( !suppress_func_warn ) - moc_warn( msg ); + tqmoc_warn( msg ); skipFunc = TRUE; } void operatorError() { if ( !suppress_func_warn ) - moc_warn("Operator functions cannot be signals or slots."); + tqmoc_warn("Operator functions cannot be signals or slots."); skipFunc = TRUE; } @@ -5607,7 +5607,7 @@ int generateProps() // if ( g->props.count() ) { if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains properties" + tqmoc_err("The declaration of the class \"%s\" contains properties" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, "#ifndef TQT_NO_PROPERTIES\n" ); @@ -5689,7 +5689,7 @@ int generateClassInfos() return 0; if ( displayWarnings && !TQ_OBJECTdetected ) - moc_err("The declaration of the class \"%s\" contains class infos" + tqmoc_err("The declaration of the class \"%s\" contains class infos" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, " static const TQClassInfo classinfo_tbl[] = {\n" ); @@ -5720,17 +5720,17 @@ void generateClass() // generate C++ source code for a class if ( g->signals.count() == 0 && g->slots.count() == 0 && g->props.count() == 0 && g->infos.count() == 0 ) return; if ( displayWarnings && (g->signals.count() + g->slots.count()) != 0 ) - moc_err("The declaration of the class \"%s\" contains signals " + tqmoc_err("The declaration of the class \"%s\" contains signals " "or slots\n\t but no TQ_OBJECT macro.", g->className.data()); } else { if ( g->superClassName.isEmpty() ) - moc_err("The declaration of the class \"%s\" contains the\n" + tqmoc_err("The declaration of the class \"%s\" contains the\n" "\tTQ_OBJECT macro but does not inherit from any class!\n" "\tInherit from TQObject or one of its descendants" " or remove TQ_OBJECT.", g->className.data() ); } if ( templateClass ) { // don't generate for class - moc_err( "Sorry, TQt does not support templates that contain\n" + tqmoc_err( "Sorry, TQt does not support templates that contain\n" "\tsignals, slots or TQ_OBJECT." ); return; } @@ -5783,9 +5783,9 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#include <%sntqapplication.h>\n\n", (const char*)g->qtPath ); fprintf( out, "#include <%sprivate/tqucomextra_p.h>\n", (const char*)g->qtPath ); fprintf( out, "#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != %d)\n", formatRevision ); - fprintf( out, "#error \"This file was generated using the moc from %s." + fprintf( out, "#error \"This file was generated using the tqmoc from %s." " It\"\n#error \"cannot be used with the include files from" - " this version of TQt.\"\n#error \"(The moc has changed too" + " this version of TQt.\"\n#error \"(TQMoc has changed too" " much.)\"\n", TQT_VERSION_STR ); fprintf( out, "#endif\n\n" ); } else { @@ -6415,7 +6415,7 @@ void addEnum() if ( lit.current()->name == tmpEnum->name ) { if ( displayWarnings ) - moc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); + tqmoc_err( "Enum %s defined twice.", (const char*)tmpEnum->name ); } } @@ -6476,7 +6476,7 @@ void addMember( Member m ) void checkPropertyName( const char* ident ) { if ( ident[0] == '_' ) { - moc_err( "Invalid property name '%s'.", ident ); + tqmoc_err( "Invalid property name '%s'.", ident ); return; } } diff --git a/src/moc/moc_yacc.h b/src/tqmoc/tqmoc_yacc.h index 9f47feba0..3a438d372 100644 --- a/src/moc/moc_yacc.h +++ b/src/tqmoc/tqmoc_yacc.h @@ -157,7 +157,7 @@ typedef union YYSTYPE { /* Line 2068 of yacc.c */ -#line 692 "moc.y" +#line 692 "tqmoc.y" char char_val; int int_val; @@ -171,7 +171,7 @@ typedef union YYSTYPE /* Line 2068 of yacc.c */ -#line 175 "moc_yacc.h" +#line 175 "tqmoc_yacc.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/src/widgets/tqtextedit.h b/src/widgets/tqtextedit.h index f58b91d09..5ea273c6e 100644 --- a/src/widgets/tqtextedit.h +++ b/src/widgets/tqtextedit.h @@ -51,7 +51,7 @@ #ifndef TQT_NO_TEXTEDIT // uncomment below to enable optimization mode - also uncomment the -// optimDoAutoScroll() private slot since moc ignores #ifdefs.. +// optimDoAutoScroll() private slot since tqmoc ignores #ifdefs.. #define QT_TEXTEDIT_OPTIMIZATION class TQPainter; |