Use Qt5's translation framework - ts files, not po files.

This commit is contained in:
Craig Drummond
2017-04-08 10:35:31 +01:00
committed by Craig Drummond
parent ae5822b778
commit b63c6fbe26
195 changed files with 156602 additions and 101551 deletions

View File

@@ -34,7 +34,6 @@
**************************************************************************/
#include "fancytabwidget.h"
#include "localize.h"
#include "icon.h"
#include "action.h"
#include "utils.h"
@@ -560,7 +559,7 @@ void FancyTabBar::setCurrentIndex(int index)
emit currentChanged(currentIdx);
}
FancyTabWidget::FancyTabWidget(QWidget *parent, bool allowContextMenu)
FancyTabWidget::FancyTabWidget(QWidget *parent)
: QWidget(parent)
, styleSetting(0)
, tabBar(NULL)
@@ -570,7 +569,6 @@ FancyTabWidget::FancyTabWidget(QWidget *parent, bool allowContextMenu)
, topLayout(new QVBoxLayout)
, menu(0)
, proxyStyle(new FancyTabProxyStyle)
, allowContext(allowContextMenu)
{
sideLayout->setSpacing(0);
sideLayout->setMargin(0);
@@ -660,50 +658,6 @@ void FancyTabWidget::showWidget(int index)
emit currentChanged(idx);
}
void FancyTabWidget::contextMenuEvent(QContextMenuEvent *e)
{
if (!allowContext) {
return;
}
// Check we are over tab space...
if (Tab==(styleSetting&Style_Mask)) {
if (QApplication::widgetAt(e->globalPos())!=tabBar) {
return;
}
}
else {
switch (styleSetting&Position_Mask) {
case Bot:
if (e->pos().y()<=(sideWidget->pos().y()+(sideWidget->height()-tabBar->height()))) {
return;
}
break;
case Top:
if (e->pos().y()>(sideWidget->pos().y()+tabBar->height())) {
return;
}
break;
default:
if (QApplication::isRightToLeft()) {
if (e->pos().x()<=sideWidget->pos().x()) {
return;
}
} else if (e->pos().x()>=sideWidget->rect().right()) {
return;
}
}
}
if (!menu) {
menu = new QMenu(this);
QAction *act=new QAction(i18n("Configure..."), this);
connect(act, SIGNAL(triggered()), SIGNAL(configRequested()));
menu->addAction(act);
}
menu->popup(e->globalPos());
}
void FancyTabWidget::setStyle(int s)
{
if (s==styleSetting && tabBar) {