Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit 532f9f6c14
  1. 3
      src/adaptors/publishing/UBDocumentPublisher.cpp
  2. 11
      src/domain/UBGraphicsScene.cpp
  3. 56
      src/web/UBTrapFlashController.cpp
  4. 3
      src/web/UBTrapFlashController.h

@ -56,6 +56,7 @@ UBDocumentPublisher::UBDocumentPublisher(UBDocumentProxy* pDocument, QObject *pa
, bLoginCookieSet(false)
{
//NOOP
init();
}
@ -555,8 +556,8 @@ void UBDocumentPublisher::init()
mDocInfos.title = "";
mDocInfos.description = "";
mpNetworkMgr = new QNetworkAccessManager(this);
mpCookieJar = new QNetworkCookieJar();
mpNetworkMgr = new QNetworkAccessManager(this);
connect(mpNetworkMgr, SIGNAL(finished(QNetworkReply*)), this, SLOT(onFinished(QNetworkReply*)));
}

@ -453,7 +453,16 @@ void UBGraphicsScene::DisposeMagnifierQWidgets()
magniferDisplayViewWidget = NULL;
}
UBApplication::app()->restoreOverrideCursor();
// some time have crash here on access to app (when call from destructor when close sankore app)
// so i just add try/catch section here
try
{
UBApplication::app()->restoreOverrideCursor();
}
catch (...)
{
}
}
void UBGraphicsScene::moveTo(const QPointF &pPoint)

@ -73,12 +73,50 @@ void UBTrapFlashController::showTrapFlash()
, viewHeight);
connect(mTrapFlashUi->flashCombobox, SIGNAL(currentIndexChanged(int)), this, SLOT(selectFlash(int)));
connect(mTrapFlashUi->widgetNameLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(text_Changed(const QString &)));
connect(mTrapFlashUi->widgetNameLineEdit, SIGNAL(textEdited(const QString &)), this, SLOT(text_Edited(const QString &)));
connect(mTrapFlashUi->createWidgetButton, SIGNAL(clicked(bool)), this, SLOT(createWidget()));
}
mTrapFlashDialog->show();
}
void UBTrapFlashController::text_Changed(const QString &newText)
{
QString new_text = newText;
#ifdef Q_WS_WIN // Defined on Windows.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
#ifdef Q_WS_QWS // Defined on Qt for Embedded Linux.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
#ifdef Q_WS_MAC // Defined on Mac OS X.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
#ifdef Q_WS_X11 // Defined on X11.
QString illegalCharList(" < > : \" / \\ | ? * ");
QRegExp regExp("[<>:\"/\\\\|?*]");
#endif
if(new_text.indexOf(regExp) > -1)
{
new_text.remove(regExp);
mTrapFlashUi->widgetNameLineEdit->setText(new_text);
QToolTip::showText(mTrapFlashUi->widgetNameLineEdit->mapToGlobal(QPoint()), "Application name can`t contain any of the following characters:\r\n"+illegalCharList);
}
}
void UBTrapFlashController::text_Edited(const QString &newText)
{
}
void UBTrapFlashController::hideTrapFlash()
{
@ -281,15 +319,15 @@ QString UBTrapFlashController::generateFullPageHtml(const QString& pDirPath, boo
QString htmlContentString;
htmlContentString += "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n";
htmlContentString += "<html>\n";
htmlContentString += "<head>\n";
htmlContentString += " <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n";
htmlContentString += "</head>\n";
htmlContentString += " <frameset cols=\"100%\">\n";
htmlContentString += " <frame src=\"" + mCurrentWebFrame->url().toString() + "\"/>\n";
htmlContentString += " </frameset>\n";
htmlContentString += "</html>\n";
htmlContentString += "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\r\n";
htmlContentString += "<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n";
htmlContentString += " <head>\r\n";
htmlContentString += " <meta http-equiv=\"refresh\" content=\"0; " + mCurrentWebFrame->url().toString() + "\">\r\n";
htmlContentString += " </head>\r\n";
htmlContentString += " <body>\r\n";
htmlContentString += " Redirect to target...\r\n";
htmlContentString += " </body>\r\n";
htmlContentString += "</html>\r\n";
if (!pGenerateFile)
{

@ -37,6 +37,9 @@ class UBTrapFlashController : public QObject
public slots:
void updateTrapFlashFromPage(QWebFrame* pCurrentWebFrame);
void text_Changed(const QString &);
void text_Edited(const QString &);
private slots:
void selectFlash(int pFlashIndex);

Loading…
Cancel
Save