With both Qt4 and Qt5, when using a click-to-focus policy, the first
attempt to paste a selection by middle mouse in an external application
which has no focus may fail. It is not clear why this succeeds for some
applications and fails for others, but refreshing the timestamp of the
selection request cures the issue. The cmake part is by Kornel.
See also this thread:
http://thread.gmane.org/gmane.editors.lyx.devel/162491
If the Qt directory is specified by --with-qt-dir, the full path
of the tools is retained. Otherwise, if qtchooser is detected,
the generic names are attempted with proper arguments to select
the desired Qt version. Otherwise, the generic names with and without
proper suffixes (either -qt5 or -qt4) are checked in the PATH.
This means that --with-qt-dir=qtdir should be used only if the tools
are not in the PATH, or qtdir/bin/{moc,rcc,uic} are the right versions
for the desired Qt. In any case, it is later checked that the selected
tools are the right ones and a warning is issued if there is a mismatch.
With this change, it is now possible to configure with --enable-qt5
and have make use "moc -qt=qt5" automatically.
This is done when the command qtchooser is available nd the desired Qt
version (qt4/qt5) is available.
This means that it is now possible to have qt4 and qt5 builds easily
on a same linux system.
This fixes the -geometry command line option and restores the
"Use icons from system's theme" checkbox in the preferences.
There is still code addressing Qt4 and xlib that has to be
audited. This code cannot be compiled with Qt5 because the
default backend is now xcb and not xlib. I have marked such
code with a "FIXME QT5" comment.
The option --enable-qt5 allows configuring for Qt5. The default is Qt4.
Nothing special is done with respect to Qt4, apart from pulling in the
correct libraries. Indeed, other than the core and gui libraries, now
also the concurrent and widgets libraries are needed.
When --with-qt-dir has been specified, programs like "moc" in the Qt
directory are unlikely to have a qualified name like moc-qt4.
Therefore, such qualified names are only considered when the base
version has not been found.
* build-type=profiling implies -fno-omit-frame-pointer in gcc. This allows sysprof to yield proper call trees
* remove --enable-grpof option (the build type is enough)
* remove --with-frontend option since we have only one frontend. Move stuff around and generally simplify the Qt detection code
* do not check for bc anymore.
* Update README.
* some functionality is in new modules now
new header locations and library names: QtConcurrent and QtWidgets
* method setResizeMode is renamed to setSectionResizeMode
* deprecated QAbstractItemModel::reset() is dropped now
* platform specific code like QApplication::syncX() is not common anymore
* QString::fromAscii() is dropped now
* some QDesktopServices methods has been moved to QStandardPaths
put LIBICONV in LIBS.
* src/Makefile.am:
* src/client/Makefile.am: update accordingly.
* config/qt4.m4: do not try to run pkg-config tests when pkg-config
is not installed.
* INSTALL.MacOSX: advise to use pkg-config; remove -lz from LDFLAGS;
remove --with-frontend=qt4 from configure line; in the svn case, remove
also --disable-stdlib-debug and --disable-concept-checks (and explain
why --disable-stdlib-debug may be needed).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19056 a592a061-630c-0410-9148-cb99ea01b6c8
* src/buffer.C
(Buffer::readString): Tell readFile that we do not have a file
(Buffer::readString): readFile(name) returns a bool, not an enum
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16931 a592a061-630c-0410-9148-cb99ea01b6c8
- pkgconfig is missing
- pkgconfig is available, but it does not have any qt information
by Jean-Marc and me
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16271 a592a061-630c-0410-9148-cb99ea01b6c8
from/to the local 8bit encoding with it.
Only the autotools build system is updated, scons and cmake users need to
add qt4 cpp flags when compiling libsupport, and link libsupport against
libQtCore.
* src/frontends/qt4/qt_helpers.[Ch]
(toqstr, qchar_to_ucs4, ucs4_to_qchar, ucs4_to_qstring,
qstring_to_ucs4, fromqstr): Move these qstring conversion functions
from here ...
* src/support/qstring_helpers.[Ch] ... to these new files
* src/support/docstring.[Ch]
(from_local8bit): new conversion function from local 8bit encoding
to ucs4
(to_local8bit): new conversion function from ucs4 to local 8bit
encoding to ucs4
(to_local8bit_failure): exception that is thrown by to_local8bit if
the argument cannot be converted to the local encoding
* src/support/filename.C
(FileName::toFilesystemEncoding): implement with the help of QFile
* src/support/Makefile.am: Add new files, qt4 cpp flags and link
against libQtCore
* src/client/client.C: Convert commandline input from local encoding
to ucs4. Convert stuff that is sent to to the server to utf8,
because LyX interprets it as utf8 on the other end of the pipe.
* src/lyx_main.C
(LyX::exec): convert commandline input from local encoding to utf8
(LyX::init): ditto
(LyX::easyParse): ditto
* development/scons/scons_manifest.py: Add new files
* config/qt4.m4: Define new variables QT4_CORE_INCLUDES,
QT4_CORE_LDFLAGS and QT4_CORE_LIB
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16257 a592a061-630c-0410-9148-cb99ea01b6c8
* config/qt4.m4
(QT4_FIND_PATH, QT_FIND_UIC4, QT_FIND_MOC4): remove,
AC_PATH_PROGS does this very well.
(QT4_DO_PKG_CONFIG): add $QT4DIR/lib to pkg-config search path;
do not run QT4_DO_MANUAL_CONFIG on failure.
(QT4_DO_MANUAL_CONFIG): remove some code.
(QT4_DO_IT_ALL): move code to handle --with-foo here; move
code to search for moc/uic here; call QT4_DO_PKG_CONFIG first,
and QT4_DO_MANUAL_CONFIG on failure.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14829 a592a061-630c-0410-9148-cb99ea01b6c8