Qt4 compilation speedup patch by Bo Peng and me.

* configure.ac: removed frontends/qt4/moc compilation.
* frontends/qt4/: moc files (*_moc.cpp) are now included at the end of relevant source file (*.C)
* SConscript: adapted to "moc included in .C file" change.
* frontends/qt4/Makefile.am:  adapted to "moc included in .C file" change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13860 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2006-05-18 08:51:12 +00:00
parent e6a167ea5e
commit 995da7bafc
65 changed files with 134 additions and 61 deletions

View File

@ -455,7 +455,6 @@ AC_CONFIG_FILES([Makefile m4/Makefile \
src/frontends/qt3/ui/Makefile \
src/frontends/qt3/ui/moc/Makefile \
src/frontends/qt4/Makefile \
src/frontends/qt4/moc/Makefile \
src/frontends/qt4/ui/Makefile \
])

View File

@ -879,7 +879,7 @@ elif frontend == 'qt4':
resources = [qt4env.Uic4(x) for x in qt4_ui_files]
#
# moc qt4_moc_files
# moc qt4_moc_files, the moced files are included in the original files
#
qt4_moced_files = [qt4env.Moc4(x.replace('.C', '_moc.cpp'), x.replace('.C', '.h')) for x in qt4_moc_files]
@ -888,7 +888,7 @@ elif frontend == 'qt4':
qt4 = qt4env.StaticLibrary(
target = '$LOCALLIBPATH/qt4',
LIBS = qt4env['QT_LIB'],
source = qt4_source_files + qt4_moc_files + Flatten(qt4_moced_files)
source = qt4_source_files + qt4_moc_files
)
Alias('qt4', qt4)

View File

@ -358,3 +358,5 @@ void BulletsModule::setCustom()
tmpbullet.setText(fromqstr(text));
tmpbullet.setFont(-1);
}
#include "BulletsModule_moc.cpp"

View File

@ -81,3 +81,5 @@ void LyXFileDialog::buttonClicked()
else if (sender() == b2_)
setDir(toqstr(b2_dir_));
}
#include "FileDialog_private_moc.cpp"

View File

@ -1,16 +1,25 @@
include $(top_srcdir)/config/common.am
include $(srcdir)/Makefile.dialogs
SUBDIRS = ui moc
DISTCLEANFILES += *_moc.cpp
libqt4_la_DEPENDENCIES = $(MOCEDFILES)
MOCEDFILES = $(MOCFILES:.C=_moc.cpp)
%_moc.cpp: %.h
$(MOC4) -o $@ $<
SUBDIRS = ui
EXTRA_DIST = pch.h Makefile.dialogs
BUILT_SOURCES = $(PCH_FILE)
BUILT_SOURCES = $(PCH_FILE) $(MOCEDFILES)
noinst_LTLIBRARIES = libqt4.la
libqt4_la_LDFLAGS = $(QT4_LDFLAGS)
libqt4_la_LIBADD = $(QT4_LIB) moc/*.lo
libqt4_la_LIBADD = $(QT4_LIB)
AM_CPPFLAGS += \
$(QT4_CPPFLAGS) \
$(PCH_FLAGS) \

View File

@ -30,3 +30,5 @@ QAboutDialog::~QAboutDialog()
} // namespace frontend
} // namespace lyx
#include "QAboutDialog_moc.cpp"

View File

@ -47,3 +47,5 @@ void QBibitemDialog::closeEvent(QCloseEvent *e)
} // namespace frontend
} // namespace lyx
#include "QBibitemDialog_moc.cpp"

View File

@ -232,3 +232,5 @@ void QBibtexDialog::closeEvent(QCloseEvent *e)
} // namespace frontend
} // namespace lyx
#include "QBibtexDialog_moc.cpp"

View File

@ -111,3 +111,5 @@ void QBoxDialog::restoreClicked()
} // namespace frontend
} // namespace lyx
#include "QBoxDialog_moc.cpp"

View File

@ -46,3 +46,5 @@ void QBranchDialog::change_adaptor()
} // namespace frontend
} // namespace lyx
#include "QBranchDialog_moc.cpp"

View File

@ -176,3 +176,5 @@ void QBranches::on_colorPB_clicked()
} // namespace frontend
} // namespace lyx
#include "QBranches_moc.cpp"

View File

@ -60,3 +60,5 @@ void QChangesDialog::closeEvent(QCloseEvent *e)
} // namespace frontend
} // namespace lyx
#include "QChangesDialog_moc.cpp"

View File

@ -72,3 +72,5 @@ void QCharacterDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QCharacterDialog_moc.cpp"

View File

@ -466,3 +466,5 @@ void QCitationFind::find(biblio::Direction dir)
} // namespace frontend
} // namespace lyx
#include "QCitationDialog_moc.cpp"

View File

@ -232,3 +232,5 @@ void XMiniBuffer::suffix_timeout()
} // namespace frontend
} // namespace lyx
#include "QCommandBuffer_moc.cpp"

View File

@ -63,3 +63,5 @@ bool QCommandEdit::event(QEvent * e)
} // namespace frontend
} // namespace lyx
#include "QCommandEdit_moc.cpp"

View File

@ -145,3 +145,5 @@ void QDelimiterDialog::rdelim_clicked(const string & str)
} // namespace frontend
} // namespace lyx
#include "QDelimiterDialog_moc.cpp"

View File

@ -116,3 +116,5 @@ void QDialogView::slotRestore()
} // namespace frontend
} // namespace lyx
#include "QDialogView_moc.cpp"

View File

@ -1035,3 +1035,5 @@ void QDocumentDialog::update(BufferParams const & params)
} // namespace frontend
} // namespace lyx
#include "QDocumentDialog_moc.cpp"

View File

@ -49,3 +49,5 @@ void QERTDialog::change_adaptor()
} // namespace frontend
} // namespace lyx
#include "QERTDialog_moc.cpp"

View File

@ -51,3 +51,5 @@ void QErrorListDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QErrorListDialog_moc.cpp"

View File

@ -224,3 +224,5 @@ void QExternalDialog::widthUnitChanged()
} // namespace frontend
} // namespace lyx
#include "QExternalDialog_moc.cpp"

View File

@ -60,3 +60,5 @@ void QFloatDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QFloatDialog_moc.cpp"

View File

@ -165,3 +165,5 @@ void QGraphicsDialog::filenameChanged(const QString & filename)
} // namespace frontend
} // namespace lyx
#include "QGraphicsDialog_moc.cpp"

View File

@ -103,3 +103,5 @@ void QIncludeDialog::browseClicked()
} // namespace frontend
} // namespace lyx
#include "QIncludeDialog_moc.cpp"

View File

@ -80,3 +80,5 @@ void QIndexDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QIndexDialog_moc.cpp"

View File

@ -87,3 +87,5 @@ void QLAction::action()
} // namespace frontend
} // namespace lyx
#include "QLAction_moc.cpp"

View File

@ -171,3 +171,5 @@ void QLMenubar::macxMenuBarInit()
} // namespace frontend
} // namespace lyx
#include "QLMenubar_moc.cpp"

View File

@ -200,3 +200,5 @@ void QLPopupMenu::specialMacXmenuHack()
} // namespace frontend
} // namespace lyx
#include "QLPopupMenu_moc.cpp"

View File

@ -97,3 +97,5 @@ void QLPrintDialog::pagerangeChanged()
} // namespace frontend
} // namespace lyx
#include "QLPrintDialog_moc.cpp"

View File

@ -270,3 +270,5 @@ void QLToolbar::update()
} // namespace frontend
} // namespace lyx
#include "QLToolbar_moc.cpp"

View File

@ -46,3 +46,5 @@ void QLogDialog::updateClicked()
} // namespace frontend
} // namespace lyx
#include "QLogDialog_moc.cpp"

View File

@ -261,3 +261,5 @@ void QMathDialog::insertCubeRoot()
} // namespace frontend
} // namespace lyx
#include "QMathDialog_moc.cpp"

View File

@ -113,3 +113,5 @@ void QMathMatrixDialog::slotClose()
} // namespace frontend
} // namespace lyx
#include "QMathMatrixDialog_moc.cpp"

View File

@ -50,3 +50,5 @@ void QNoteDialog::change_adaptor()
} // namespace frontend
} // namespace lyx
#include "QNoteDialog_moc.cpp"

View File

@ -86,3 +86,5 @@ void QParagraphDialog::enableLinespacingValue(int)
} // namespace frontend
} // namespace lyx
#include "QParagraphDialog_moc.cpp"

View File

@ -1605,3 +1605,5 @@ void QPrefsDialog::update(LyXRC const & rc)
} // namespace frontend
} // namespace lyx
#include "QPrefsDialog_moc.cpp"

View File

@ -135,3 +135,5 @@ void QRefDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QRefDialog_moc.cpp"

View File

@ -123,3 +123,5 @@ void QSearchDialog::replaceallClicked()
} // namespace frontend
} // namespace lyx
#include "QSearchDialog_moc.cpp"

View File

@ -57,3 +57,5 @@ void QSendtoDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QSendtoDialog_moc.cpp"

View File

@ -37,3 +37,5 @@ void QShowFileDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QShowFileDialog_moc.cpp"

View File

@ -106,3 +106,5 @@ void QSpellcheckerDialog::reject()
} // namespace frontend
} // namespace lyx
#include "QSpellcheckerDialog_moc.cpp"

View File

@ -57,3 +57,5 @@ void QTabularCreateDialog::rowsChanged(int)
} // namespace frontend
} // namespace lyx
#include "QTabularCreateDialog_moc.cpp"

View File

@ -383,3 +383,5 @@ void QTabularDialog::ltLastFooterEmpty_clicked()
} // namespace frontend
} // namespace lyx
#include "QTabularDialog_moc.cpp"

View File

@ -104,3 +104,5 @@ void QTexinfoDialog::enableViewPB()
} // namespace frontend
} // namespace lyx
#include "QTexinfoDialog_moc.cpp"

View File

@ -133,3 +133,5 @@ void QThesaurusDialog::updateLists()
} // namespace frontend
} // namespace lyx
#include "QThesaurusDialog_moc.cpp"

View File

@ -239,3 +239,5 @@ bool QTocDialog::isVisible() const
} // namespace frontend
} // namespace lyx
#include "QTocDialog_moc.cpp"

View File

@ -62,3 +62,5 @@ void QURLDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QURLDialog_moc.cpp"

View File

@ -74,3 +74,5 @@ void QVSpaceDialog::enableCustom(int selection)
} // namespace frontend
} // namespace lyx
#include "QVSpaceDialog_moc.cpp"

View File

@ -108,3 +108,5 @@ void QViewSource::update_contents()
} // namespace frontend
} // namespace lyx
#include "QViewSource_moc.cpp"

View File

@ -38,3 +38,5 @@ void QViewSourceDialog::closeEvent(QCloseEvent * e)
} // namespace frontend
} // namespace lyx
#include "QViewSourceDialog_moc.cpp"

View File

@ -671,3 +671,5 @@ pascal OSErr handleOpenDocuments(const AppleEvent* inEvent,
return err;
}
#endif // Q_WS_MACX
#include "QWorkArea_moc.cpp"

View File

@ -55,3 +55,5 @@ void QWrapDialog::change_adaptor()
} // namespace frontend
} // namespace lyx
#include "QWrapDialog_moc.cpp"

View File

@ -209,3 +209,5 @@ void QtView::busy(bool yes) const
} // namespace frontend
} // namespace lyx
#include "QtView_moc.cpp"

View File

@ -151,3 +151,5 @@ void TocModel::populate(TocIterator & iter,
} // namespace frontend
} // namespace lyx
#include "TocModel_moc.cpp"

View File

@ -110,3 +110,5 @@ void EmptyTable::mouseMoveEvent(QMouseEvent *ev)
setNumberRows(y / cellsize + rowCount()-1);
}
*/
#include "emptytable_moc.cpp"

View File

@ -277,3 +277,5 @@ void FloatPlacement::checkAllowed()
heredefinitelyCB->setEnabled(!defaults);
}
}
#include "floatplacement_moc.cpp"

View File

@ -120,3 +120,5 @@ out:
setUpdatesEnabled(true);
update();
}
#include "iconpalette_moc.cpp"

View File

@ -77,3 +77,5 @@ void LengthCombo::noPercents()
}
}
}
#include "lengthcombo_moc.cpp"

View File

@ -1,28 +0,0 @@
include $(top_srcdir)/config/common.am
include $(srcdir)/../Makefile.dialogs
DISTCLEANFILES += *.C
EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
AM_CPPFLAGS += \
$(QT4_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/frontends \
-I$(top_srcdir)/src/frontends/controllers \
-I$(top_srcdir)/src/frontends/qt4 \
-I$(top_builddir)/src/frontends/qt4 \
$(QT4_INCLUDES) \
$(BOOST_INCLUDES)
noinst_LTLIBRARIES = libqt4moc.la
nodist_libqt4moc_la_SOURCES = $(MOCFILES:.C=_moc.C)
# The trick.
libqt4moc_la_LINK = touch libqt4moc.la ; echo
%_moc.C: $(srcdir)/../%.h
$(MOC4) -o $@ $<

View File

@ -1,27 +0,0 @@
// -*- C++ -*-
#include <config.h>
#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/function.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals/trackable.hpp>
#include <boost/signal.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/utility.hpp>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <map>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
// Have I said anything about the braindeadness of QT lately?
// Just to remind you: signals slot emit as macros, pure lunacy!
// So we are not able to have any qt headers in the pch.

View File

@ -132,3 +132,5 @@ void PanelStack::switchPanel(QTreeWidgetItem * item, QTreeWidgetItem* previous)
stack_->setCurrentWidget(cit->second);
}
#include "panelstack_moc.cpp"

View File

@ -234,3 +234,5 @@ bool QSetBorder::getBottom()
{
return bottom_.set;
}
#include "qsetborder_moc.cpp"

View File

@ -27,3 +27,5 @@ void socket_callback::data_received()
{
func_();
}
#include "socket_callback_moc.cpp"

View File

@ -167,3 +167,5 @@ PathValidator * getPathValidator(QLineEdit * ed)
return 0;
return dynamic_cast<PathValidator *>(validator);
}
#include "validators_moc.cpp"