Skip to content

Commit

Permalink
enhanced translation;
Browse files Browse the repository at this point in the history
enhances for readability;
some fixes;
  • Loading branch information
F1ash committed Jun 30, 2018
1 parent b72cfd5 commit 3fc1b53
Show file tree
Hide file tree
Showing 82 changed files with 262 additions and 241 deletions.
2 changes: 1 addition & 1 deletion src/create_widgets/domain/_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void _Tab::readXMLDesciption()
}
void _Tab::readXMLDesciption(const QString &_xmlDesc)
{

Q_UNUSED(_xmlDesc)
}
void _Tab::resetData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Generic_Ethernet::Generic_Ethernet(
commonLayout->addWidget(addr);
commonLayout->addStretch(-1);
setLayout(commonLayout);
// dataChanged connects
// dataChanged connections
connect(target, SIGNAL(textEdited(QString)),
this, SLOT(stateChanged()));
connect(script, SIGNAL(textEdited(QString)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MAC_Address::MAC_Address(QWidget *parent) :
setLayout(commonLayout);
connect(useMac, SIGNAL(toggled(bool)),
mac, SLOT(setEnabled(bool)));
// dataChanged connects
// dataChanged connections
connect(useMac, SIGNAL(toggled(bool)),
this, SLOT(stateChanged()));
connect(mac, SIGNAL(textEdited(QString)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ MultiCast_Tunnel::MultiCast_Tunnel(
commonLayout->addWidget(addr);
commonLayout->addStretch(-1);
setLayout(commonLayout);
// dataChanged connects
// dataChanged connections
connect(ipAddr, SIGNAL(textEdited(QString)),
this, SLOT(stateChanged()));
connect(port, SIGNAL(valueChanged(int)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ TCP_Tunnel::TCP_Tunnel(
commonLayout->addWidget(addr);
commonLayout->addStretch(-1);
setLayout(commonLayout);
// dataChanged connects
// dataChanged connections
connect(type, SIGNAL(currentIndexChanged(int)),
this, SLOT(stateChanged()));
connect(ipAddr, SIGNAL(textEdited(QString)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ to have outgoing access."));
commonLayout->addWidget(addr);
commonLayout->addStretch(-1);
setLayout(commonLayout);
// dataChanged connects
// dataChanged connections
connect(mac, SIGNAL(dataChanged()),
this, SLOT(stateChanged()));
connect(addr, SIGNAL(dataChanged()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ VirtualPort::VirtualPort(QWidget *parent) :
this, SLOT(virtPortTypeChanged(int)));
// set empty type for the general case
type->setCurrentIndex(type->count()-1);
// dataChanged connects
// dataChanged connections
connect(useVirtPort, SIGNAL(toggled(bool)),
this, SLOT(stateChanged()));
connect(type, SIGNAL(currentIndexChanged(int)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BIOS_Boot::BIOS_Boot(QWidget *parent, QString _caps) :
connect(architecture, SIGNAL(archType(const QString&)),
this, SLOT(changeArch(const QString&)));
architecture->setItems();
// dataChanged connectins
// dataChanged connections
connect(architecture, SIGNAL(dataChanged()),
this, SLOT(stateChanged()));
connect(loader, SIGNAL(dataChanged()),
Expand Down
2 changes: 1 addition & 1 deletion src/create_widgets/domain/create_virt_domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ bool CreateVirtDomain::buildXMLDescription()
* but nullptr-elemens not removed
* therefore keep to seek on not-nullptr next element
*/
uint j = 0;
int j = 0;
int count = list.length();
for (int i=0; i<count; i++) {
//qDebug()<<list.item(j).nodeName()<<i;
Expand Down
2 changes: 1 addition & 1 deletion src/create_widgets/domain/lxc_widgets/lxc_os_booting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ LXC_OSBooting::LXC_OSBooting(
connect(architecture, SIGNAL(emulatorType(const QString&)),
this, SIGNAL(emulatorType(const QString&)));
architecture->setItems();
// dataChanged connectins
// dataChanged connections
connect(architecture, SIGNAL(dataChanged()),
this, SLOT(stateChanged()));
connect(initPath, SIGNAL(textEdited(QString)),
Expand Down
7 changes: 4 additions & 3 deletions src/create_widgets/snapshot/_snapshot_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ _SnapshotFlags::_SnapshotFlags(QWidget *parent) :
}
void _SnapshotFlags::changeAvailableFlags(int control)
{
Q_UNUSED(control)
return;
}
int _SnapshotFlags::getCompositeFlag() const
uint _SnapshotFlags::getCompositeFlag() const
{
int ret = 0;
uint ret = 0;
foreach (QAction *act, actGroup->actions()) {
if ( act->isChecked() ) {
ret += act->data().toInt();
ret += act->data().toUInt();
};
};
return ret;
Expand Down
5 changes: 2 additions & 3 deletions src/create_widgets/snapshot/_snapshot_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ class _SnapshotFlags : public QMenu
{
Q_OBJECT
public:
explicit _SnapshotFlags(
QWidget *parent = nullptr);
explicit _SnapshotFlags(QWidget *parent = nullptr);
QActionGroup *actGroup;
int getCompositeFlag() const;
uint getCompositeFlag() const;
virtual void changeAvailableFlags(int);
virtual void changeFlagCompatibility();
};
Expand Down
2 changes: 1 addition & 1 deletion src/create_widgets/snapshot/_snapshot_stuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ QDomDocument _SnapshotStuff::getElements() const
void _SnapshotStuff::setParameters(virConnectPtr* connPtrPtr, QString &_domName)
{
SetDisksDataThread *setThread = new SetDisksDataThread(this);
setThread->setCurrentWorkConnect(connPtrPtr, 0, _domName);
setThread->setCurrentWorkConnection(connPtrPtr, 0, _domName);
connect(setThread, SIGNAL(diskData(QDomElement&)),
this, SLOT(setDiskItem(QDomElement&)));
connect(setThread, SIGNAL(errorMsg(const QString&, const uint)),
Expand Down
1 change: 1 addition & 0 deletions src/create_widgets/snapshot/model/snapshot_tree_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ int SnapshotTreeModel::rowCount(const QModelIndex &parent) const
}
int SnapshotTreeModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return 2;
}
QVariant SnapshotTreeModel::headerData(int section, Qt::Orientation orientation, int role) const
Expand Down
2 changes: 1 addition & 1 deletion src/create_widgets/snapshot/snapshot_action_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void SnapshotActionDialog::addSnapshotChild(int row, const QModelIndex &parent,
_data.clear();
_data.append(
QDateTime::fromMSecsSinceEpoch(
_el.text().toULongLong()*1000)
_el.text().toLongLong()*1000)
.toString("yyyy-MM-dd_HH:mm:ss"));
};
_el = doc
Expand Down
2 changes: 1 addition & 1 deletion src/create_widgets/snapshot/snapshot_action_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SnapshotActionDialog : public QDialog
virDomainPtr domain = nullptr;
const QString domName;
Act_Param params;
int flags = 0;
uint flags = 0;
SnapshotTreeModel *model;
QAction *revertAction;
RevertSnapshotFlags *revertFlagsMenu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ QString _Storage_Auth::getSecretType() const
/* private slots */
void _Storage_Auth::usageTypeChanged(int i)
{
Q_UNUSED(i)
QString _type = usageType->currentText().toLower();
if ( _type=="usage" ) {
usage->setPlaceholderText("libvirtiscsi");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FindSecretDialog::FindSecretDialog(
settings.endGroup();
secrets = new VirtSecretControl(this);
secrets->setUsageInSoftTouched(false);
secrets->setCurrentWorkConnect(ptr_ConnPtr);
secrets->setCurrentWorkConnection(ptr_ConnPtr);
hlpThread = new SecretControlThread(this);
connect(hlpThread, SIGNAL(resultData(Result)),
this, SLOT(hlpThreadResult(Result)));
Expand Down
2 changes: 1 addition & 1 deletion src/create_widgets/storage/create_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ QString CreatePool::getXMLDescFileName() const
* but NULL-elemens not removed
* therefore keep to seek on not-NULL next element
*/
uint j = 0;
int j = 0;
const int count = list.length();
for (int i=0; i<count;i++) {
//qDebug()<<list.item(j).nodeName()<<i;
Expand Down
2 changes: 1 addition & 1 deletion src/dock_head_widgets/bar_name.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BarNameLabel::BarNameLabel(QWidget *parent) :
}

/* public slots */
void BarNameLabel::setColor(int color)
void BarNameLabel::setColor(uint color)
{
_color = color;
}
Expand Down
6 changes: 3 additions & 3 deletions src/dock_head_widgets/bar_name.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class BarNameLabel : public QLabel
explicit BarNameLabel(QWidget *parent = nullptr);

private:
int _size = 0;
int _color = 0x000000;
int _size = 0;
uint _color = 0x000000;

public slots:
void setColor(int);
void setColor(uint);

private slots:
void paintEvent(QPaintEvent*);
Expand Down
30 changes: 15 additions & 15 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,12 +779,12 @@ void MainWindow::deleteCurrentConnection()
{
connListWidget->list->deleteCurrentConnection();
}
void MainWindow::removeConnItem(const QString &connect)
void MainWindow::removeConnItem(const QString &connection)
{
settings.beginGroup("Connects");
settings.remove(connect);
settings.remove(connection);
settings.endGroup();
//qDebug()<<connect<<"connect deleted";
//qDebug()<<connection<<"connection deleted";
}
void MainWindow::openCurrentConnection()
{
Expand Down Expand Up @@ -914,18 +914,18 @@ void MainWindow::receiveConnPtrPtr(virConnectPtr *_connPtrPtr, const QString &na
entityControlIsUpdated = 0;
connListWidget->setEnabled(false);
//qDebug()<<"receiveConnPtrPtr:"<<(*_connPtrPtr);
// send connect ptr to all related virtual resources for operating
if ( domainDockContent->setCurrentWorkConnect(_connPtrPtr) )
// send connection ptr to all related virtual resources for operating
if ( domainDockContent->setCurrentWorkConnection(_connPtrPtr) )
domainDockContent->setListHeader(name);
if ( networkDockContent->setCurrentWorkConnect(_connPtrPtr) )
if ( networkDockContent->setCurrentWorkConnection(_connPtrPtr) )
networkDockContent->setListHeader(name);
if ( storagePoolDockContent->setCurrentWorkConnect(_connPtrPtr) )
if ( storagePoolDockContent->setCurrentWorkConnection(_connPtrPtr) )
storagePoolDockContent->setListHeader(name);
if ( secretDockContent->setCurrentWorkConnect(_connPtrPtr) )
if ( secretDockContent->setCurrentWorkConnection(_connPtrPtr) )
secretDockContent->setListHeader(name);
if ( ifaceDockContent->setCurrentWorkConnect(_connPtrPtr) )
if ( ifaceDockContent->setCurrentWorkConnection(_connPtrPtr) )
ifaceDockContent->setListHeader(name);
if ( nwfilterDockContent->setCurrentWorkConnect(_connPtrPtr) )
if ( nwfilterDockContent->setCurrentWorkConnection(_connPtrPtr) )
nwfilterDockContent->setListHeader(name);
}
void MainWindow::entityControlUpdated()
Expand Down Expand Up @@ -957,7 +957,7 @@ void MainWindow::entityControlUpdated()
}
void MainWindow::stopConnProcessing(bool onView, const QString &_connName)
{
// clear Overview Docks if closed connect is on View
// clear Overview Docks if closed connection is on View
if ( onView ) {
stopProcessing();
};
Expand Down Expand Up @@ -1052,7 +1052,7 @@ void MainWindow::invokeVMDisplay(TASK *_task)
logDockContent, SLOT(appendMsgToLog(const QString&)));
connect(VM_Displayed_Map.value(key), SIGNAL(addNewTask(TASK*)),
taskWrHouse, SLOT(addNewTask(TASK*)));
// will be showed when occured successful connect to VM
// will be showed when occured successful connection to VM
//VM_Displayed_Map.value(key)->show();
} else {
//qDebug()<<key<<"vm invoked"<<"exist";
Expand Down Expand Up @@ -1096,10 +1096,10 @@ void MainWindow::deleteVMDisplay(const QString &key)
}
void MainWindow::buildMigrateArgs(TASK *_task)
{
virConnectPtr *namedConnect =
virConnectPtr *namedConnection =
connListWidget->list->getPtr_connectionPtr(_task->args.path);
if ( nullptr!=namedConnect ) {
domainDockContent->execMigrateAction(namedConnect, _task);
if ( nullptr!=namedConnection ) {
domainDockContent->execMigrateAction(namedConnection, _task);
} else {
QString time = QTime::currentTime().toString();
QString title =
Expand Down
10 changes: 5 additions & 5 deletions src/settings/conn_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ void ConnSettings::initButtons()
buttons = new QWidget(this);
buttons->setLayout(buttonsLayout);
connect(ok, SIGNAL(clicked()),
this, SLOT(saveConnect()));
this, SLOT(saveConnection()));
connect(cancel, SIGNAL(clicked()),
this, SLOT(cancelConnect()));
this, SLOT(cancelConnection()));
}
void ConnSettings::setConnectItem(ConnItemIndex *idx)
{
Expand All @@ -131,7 +131,7 @@ void ConnSettings::setConnectItem(ConnItemIndex *idx)
initParameters();
};
}
void ConnSettings::saveConnect()
void ConnSettings::saveConnection()
{
name = ConnName->text();
settings.beginGroup("Connects");
Expand Down Expand Up @@ -171,7 +171,7 @@ void ConnSettings::saveConnect()
settings.sync();
done(QDialog::Accepted);
}
void ConnSettings::cancelConnect()
void ConnSettings::cancelConnection()
{
if (newbe) {
settings.beginGroup("Connects");
Expand Down Expand Up @@ -248,7 +248,7 @@ void ConnSettings::saveParameters()
void ConnSettings::closeEvent(QCloseEvent *ev)
{
ev->ignore();
cancelConnect();
cancelConnection();
}
void ConnSettings::set_Title_Name(QString s)
{
Expand Down
4 changes: 2 additions & 2 deletions src/settings/conn_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ private slots:
void initParamLayout();
void initButtons();
void initParameters();
void saveConnect();
void cancelConnect();
void saveConnection();
void cancelConnection();
void saveParameters();
void closeEvent(QCloseEvent*);
void set_Title_Name(QString);
Expand Down
4 changes: 2 additions & 2 deletions src/state_monitor/domain_monitor_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ void DomainMonitorThread::run()
curr_cpuTime = info.cpuTime;
_time_diff = tMark.elapsed()/1000;
cpu_time_diff = (firstStep)? 0 : curr_cpuTime - prev_cpuTime;
CPU_percent = (qreal)100/(_time_diff * info.nrVirtCpu)*(qreal)cpu_time_diff/1000000000;
CPU_percent = qreal(100)/(_time_diff * info.nrVirtCpu)*qreal(cpu_time_diff)/1000000000;
tMark.restart();
MEM = info.maxMem;
MEM_percent = 100*(qreal)info.memory / MEM;
MEM_percent = qreal(info.memory)*100 / MEM;
//qDebug()<<CPU_percent<< MEM_percent<<info.memory<< MEM;
prev_cpuTime = curr_cpuTime;
if ( firstStep ) firstStep = false;
Expand Down
6 changes: 4 additions & 2 deletions src/state_monitor/domain_state_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ DomainStateMonitor::DomainStateMonitor(QWidget *parent) :

/* public slots */
void DomainStateMonitor::setNewMonitoredDomain(
virConnectPtr *connPtrPtr, const QString &connName, const QString &domainName)
virConnectPtr *connPtrPtr,
const QString &connName,
const QString &domainName)
{
QString _id = QString(tr("Domain : %1\nConnect: %2"))
QString _id = QString(tr("Domain : %1\nConnection: %2"))
.arg(domainName)
.arg(connName);
int idx =
Expand Down
Loading

0 comments on commit 3fc1b53

Please sign in to comment.