D23866: Port from KHTML to QtWebEngine

Laurent Montel noreply at phabricator.kde.org
Wed Sep 11 12:08:20 BST 2019


mlaurent requested changes to this revision.
mlaurent added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> mainwindow.cpp:263
> -    action->setIcon( QIcon::fromTheme( QStringLiteral("zoom-in") ) );
> -    connect( action, &QAction::triggered, this, &MainWindow::slotIncFontSizes );
> -

We still have zoom support in webengine. see setZoomFactor
I think that it's useful to be able to increase/decrease it.

> mainwindow.cpp:292
>  
> -void MainWindow::print()
>  {

Print support can be implemented

I use a code as it:
bool WebEnginePage::execPrintPreviewPage(QPrinter *printer, int timeout)
{

  QPointer<QEventLoop> loop = new QEventLoop;
  bool result = false;
  QTimer::singleShot(timeout, loop.data(), &QEventLoop::quit);
  
  print(printer, [loop, &result](bool res) {
      if (loop && loop->isRunning()) {
          result = res;
          loop->quit();
      }
  });
  
  loop->exec();
  delete loop;
  
  return result;

}
see WebEnginePage

> view.cpp:213
> -
> -void View::showMenu( const QString& url, const QPoint& pos)
> -{

QAction *QWebEngineView::pageAction(QWebEnginePage::WebAction action) const
can generate some actions.

REPOSITORY
  R125 KHelpCenter

REVISION DETAIL
  https://phabricator.kde.org/D23866

To: svuorela, vkrause, dfaure, carewolf, pino, ltoscano, lbeltrame, lueck, clauschristensen, cordlandwehr, mlaurent
Cc: kde-doc-english, gennad, fbampaloukas, skadinna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-doc-english/attachments/20190911/37e3b40c/attachment.html>


More information about the kde-doc-english mailing list