[Development] New QTextDocument feature: CSS-style table cell border formatting

2015-10-21 Thread Nils Jeisecke
Hi list,

the existing QTextDocument table style options are rather lackluster.
It's basically "ugly grid" (resembling ancient 1998's html tables) or
"no grid".

As we needed some more flexibility we've implemented a subset of the
CSS table cell border formatting including a border-collapse mode.
This includes correct pagination (border line continuation) and
repeated header rows suitable for printing.

We've also added support for a subset of the CSS border styles
(limited to TD elements) in the HTML importer and exporter so that
it's possible to use Qt's TextEdit example for trying the new
functionality.

I'd like to invite anyone interested to have a look at this change request:

https://codereview.qt-project.org/#/c/126950/

Any feedback and hints on how to add reasonable auto tests will be appreciated.

Thanks

Nils
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Contribution: include separate libraries with inlines in the Qt installers

2015-10-21 Thread Thiago Macieira
Em qua 21 out 2015, às 14:58:07, Dimitar Dobrev escreveu:
> The way I do it locally is by generating a *.pro file as described at
> https://bugreports.qt.io/browse/QTBUG-47569 : QT += widgets
> QMAKE_CXXFLAGS += -fkeep-inline-functions -std=c++0x
> TARGET = QtWidgets-inlines
> TEMPLATE = lib
> SOURCES += QtWidgets-inlines.cpp
> LIBS += -loleaut32 -lole32
> And a single *.cpp file:
> #include 
> The resulting library is then deployed alongside the user's application.
> Since such a library would be the same (per module) for any binding I
> figured it could - as suggested at
> http://lists.qt-project.org/pipermail/development/2014-April/016803.html -
> be made a part of Qt.

How do we do it with MSVC? What's the equivalent to -fkeep-inline-functions?

And if it's that easy for you to create it, I think you should create that 
yourself in your project.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Contribution: include separate libraries with inlines in the Qt installers

2015-10-21 Thread Thiago Macieira
Em seg 19 out 2015, às 07:18:15, Dimitar Dobrev escreveu:
> Hello all,
> I would like to ask your opinion about [QTBUG-48668] Include separate
> libraries with inlines in the Qt installers - Qt Bug Tracker .I could
> also use some guidelines in case I can help contribute such a feature.

Please explain how a library with inlines would be created.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] RFC: Proposal for a semi-radical change in Qt APIs taking strings

2015-10-21 Thread Thiago Macieira
Em qua 21 out 2015, às 06:45:53, Knoll Lars escreveu:
> >That doesn't work. I've tried to change QStringRef and it broke in a lot
> >of  places.
> 
> Do you remember what broke?

Not really. When I tracked down the failures, I did find out that it was 
related to the original QString being reallocated, so the QStringRef had a 
dangling reference. But I don't remember more details.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QTBUG-48709: calling ::exit() may crash

2015-10-21 Thread Sergio Martins
On Wednesday, October 21, 2015 03:15:38 AM Robert Griebl wrote:
> On 20.10.2015 17:56, Thiago Macieira wrote:
> > ...because the application will unload the libraries while other threads
> > are still running code from those threads. In the bug report, the crash
> > happens because of the QXcbEventReader thread, but it could have been any
> > other thread we start or any other library starts.
> > 
> > Can anyone think of a solution to this problem?
> 
> We had the exact some problem with Wayland a few weeks ago, where
> QtWayland would call ::exit() if it encounters an error: the process
> would then crash while trying to cleanup a sqlite database. 

I had that too, but it's a different bug. It happens on the same thread that 
called exit().

libQt5Sql.so calls plugin code at static dtor time, at which point the plugin 
was already unloaded.

 Access not within mapped region at address 0x7146D60
   at 0x6AE6F86: QSqlDatabase::close() (qsqldatabase.cpp:871)
   by 0x6AE6D58: QSqlDatabase::~QSqlDatabase() (qsqldatabase.cpp:799)
   by 0x6AE9F0D: QHashNode::~QHashNode() (qhash.h:197)
   by 0x6AE9F41: QHash::deleteNode2(QHashData::Node*) 
(qhash.h:545)
   by 0x6CBB5A1: QHashData::free_helper(void (*)(QHashData::Node*)) 
(qhash.cpp:493)
   by 0x6AE97A8: QHash::freeData(QHashData*) (qhash.h:
581)
   by 0x6AE890F: QHash::~QHash() (in /data/
installation/qt/x86_64-foo-5.4d/lib/libQt5Sql.so.5.4.3)
   by 0x6AE8575: QConnectionDict::~QConnectionDict() (qsqldatabase.cpp:110)
   by 0x6AE5AC9: (anonymous 
namespace)::Q_QGS_dbDict::innerFunction()::Holder::~Holder() 
(qsqldatabase.cpp:126)
   by 0x7A5CF87: __run_exit_handlers (in /usr/lib/libc-2.22.so)
   by 0x7A5CFD4: exit (in /usr/lib/libc-2.22.so)
   by 0xBFD15E3: QWaylandDisplay::exitWithError() (qwaylanddisplay.cpp:193)


Inspecting where the unmapped 0x7146D60 is:

0x07146a20 - 0x07146dd8 is .data.rel.ro in /data/installation/
qt/x86_64-foo-5.4d/plugins/sqldrivers/libqsqlpsql.so


So:

1) Don't have code running at static cleanup time, unless you have to.

2) If you have to do 1) then don't call code of libraries you don't link 
against, unless you have to. ( plugin calling libQt5Sql is fine, the other way 
is not).

3) If you have to do 2), then don't call exit() :)

Regards,
-- 
Sérgio Martins | sergio.mart...@kdab.com | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - The Qt Experts
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development