mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Clazy: Add second batch of SIGNAL/SLOT removal
This commit is contained in:
parent
f813a018d2
commit
ae8e47d863
@ -126,7 +126,7 @@ Comic::~Comic()
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void Comic::setup()
|
void Comic::setup()
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(pageChanged(int)), this, SLOT(checkIsBookmark(int)));
|
connect(this, &Comic::pageChanged, this, &Comic::checkIsBookmark);
|
||||||
connect(this, SIGNAL(imageLoaded(int)), this, SLOT(updateBookmarkImage(int)));
|
connect(this, SIGNAL(imageLoaded(int)), this, SLOT(updateBookmarkImage(int)));
|
||||||
connect(this, SIGNAL(imageLoaded(int)), this, SLOT(setPageLoaded(int)));
|
connect(this, SIGNAL(imageLoaded(int)), this, SLOT(setPageLoaded(int)));
|
||||||
|
|
||||||
|
@ -44,8 +44,8 @@ void HttpWorker::run()
|
|||||||
QTimer tT;
|
QTimer tT;
|
||||||
|
|
||||||
tT.setSingleShot(true);
|
tT.setSingleShot(true);
|
||||||
connect(&tT, SIGNAL(timeout()), &q, SLOT(quit()));
|
connect(&tT, &QTimer::timeout, &q, &QEventLoop::quit);
|
||||||
connect(&manager, SIGNAL(finished(QNetworkReply *)), &q, SLOT(quit()));
|
connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
|
||||||
QNetworkReply *reply = manager.get(QNetworkRequest(url));
|
QNetworkReply *reply = manager.get(QNetworkRequest(url));
|
||||||
|
|
||||||
tT.start(5000); // 5s timeout
|
tT.start(5000); // 5s timeout
|
||||||
|
@ -9,9 +9,9 @@ OnStartFlowSelectionDialog::OnStartFlowSelectionDialog(QWidget *parent)
|
|||||||
{
|
{
|
||||||
setModal(true);
|
setModal(true);
|
||||||
QPushButton *acceptHW = new QPushButton(this);
|
QPushButton *acceptHW = new QPushButton(this);
|
||||||
connect(acceptHW, SIGNAL(clicked()), this, SLOT(accept()));
|
connect(acceptHW, &QAbstractButton::clicked, this, &QDialog::accept);
|
||||||
QPushButton *rejectHW = new QPushButton(this); //and use SW flow
|
QPushButton *rejectHW = new QPushButton(this); //and use SW flow
|
||||||
connect(rejectHW, SIGNAL(clicked()), this, SLOT(reject()));
|
connect(rejectHW, &QAbstractButton::clicked, this, &QDialog::reject);
|
||||||
|
|
||||||
acceptHW->setGeometry(90, 165, 110, 118);
|
acceptHW->setGeometry(90, 165, 110, 118);
|
||||||
acceptHW->setFlat(true);
|
acceptHW->setFlat(true);
|
||||||
|
@ -984,7 +984,7 @@ PictureFlow::PictureFlow(QWidget *parent, FlowType flowType)
|
|||||||
|
|
||||||
d->animator = new PictureFlowAnimator;
|
d->animator = new PictureFlowAnimator;
|
||||||
d->animator->state = d->state;
|
d->animator->state = d->state;
|
||||||
QObject::connect(&d->animator->animateTimer, SIGNAL(timeout()), this, SLOT(updateAnimation()));
|
QObject::connect(&d->animator->animateTimer, &QTimer::timeout, this, &PictureFlow::updateAnimation);
|
||||||
|
|
||||||
QObject::connect(&d->triggerTimer, SIGNAL(timeout()), this, SLOT(render()));
|
QObject::connect(&d->triggerTimer, SIGNAL(timeout()), this, SLOT(render()));
|
||||||
|
|
||||||
@ -1299,9 +1299,9 @@ void PictureFlow::updateAnimation() //bucle principal
|
|||||||
if (d->animator->animating == true) {
|
if (d->animator->animating == true) {
|
||||||
int difference = 10 - now.elapsed();
|
int difference = 10 - now.elapsed();
|
||||||
if (difference >= 0 && !frameSkiped)
|
if (difference >= 0 && !frameSkiped)
|
||||||
QTimer::singleShot(difference, this, SLOT(updateAnimation()));
|
QTimer::singleShot(difference, this, &PictureFlow::updateAnimation);
|
||||||
else {
|
else {
|
||||||
QTimer::singleShot(0, this, SLOT(updateAnimation()));
|
QTimer::singleShot(0, this, &PictureFlow::updateAnimation);
|
||||||
if (!frameSkiped)
|
if (!frameSkiped)
|
||||||
framesSkip = -((difference - 10) / 10);
|
framesSkip = -((difference - 10) / 10);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ BusyIndicator::BusyIndicator(QWidget *parent)
|
|||||||
fillColor = palette().color(QPalette::WindowText);
|
fillColor = palette().color(QPalette::WindowText);
|
||||||
|
|
||||||
timer.setInterval(16);
|
timer.setInterval(16);
|
||||||
connect(&timer, SIGNAL(timeout()), this, SLOT(rotate()));
|
connect(&timer, &QTimer::timeout, this, &BusyIndicator::rotate);
|
||||||
timer.start();
|
timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ YACReaderGLFlowConfigWidget::YACReaderGLFlowConfigWidget(QWidget *parent /* = 0
|
|||||||
|
|
||||||
showAdvancedOptions = new QPushButton(tr("Show advanced settings"));
|
showAdvancedOptions = new QPushButton(tr("Show advanced settings"));
|
||||||
showAdvancedOptions->setCheckable(true);
|
showAdvancedOptions->setCheckable(true);
|
||||||
connect(showAdvancedOptions, SIGNAL(toggled(bool)), this, SLOT(avancedOptionToogled(bool)));
|
connect(showAdvancedOptions, &QAbstractButton::toggled, this, &YACReaderGLFlowConfigWidget::avancedOptionToogled);
|
||||||
|
|
||||||
vbox->addWidget(showAdvancedOptions, 0, Qt::AlignRight);
|
vbox->addWidget(showAdvancedOptions, 0, Qt::AlignRight);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n /*ame*/, QStrin
|
|||||||
options->setFixedWidth(18);
|
options->setFixedWidth(18);
|
||||||
options->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
options->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
||||||
options->setStyleSheet("QToolButton {border:none;}");
|
options->setStyleSheet("QToolButton {border:none;}");
|
||||||
connect(options, SIGNAL(clicked()), this, SIGNAL(showOptions()));
|
connect(options, &QAbstractButton::clicked, this, &YACReaderLibraryItemWidget::showOptions);
|
||||||
/*up = new QToolButton(this);
|
/*up = new QToolButton(this);
|
||||||
up->setIcon(QIcon(":/images/libraryUp.png"));
|
up->setIcon(QIcon(":/images/libraryUp.png"));
|
||||||
up->setHidden(true);
|
up->setHidden(true);
|
||||||
|
@ -21,7 +21,7 @@ void YACReaderLibraryListWidget::addItem(QString name, QString path)
|
|||||||
QVBoxLayout *mainLayout = dynamic_cast<QVBoxLayout *>(layout());
|
QVBoxLayout *mainLayout = dynamic_cast<QVBoxLayout *>(layout());
|
||||||
|
|
||||||
YACReaderLibraryItemWidget *library = new YACReaderLibraryItemWidget(name, path, this);
|
YACReaderLibraryItemWidget *library = new YACReaderLibraryItemWidget(name, path, this);
|
||||||
connect(library, SIGNAL(showOptions()), this, SLOT(showContextMenu()));
|
connect(library, &YACReaderLibraryItemWidget::showOptions, this, &YACReaderLibraryListWidget::showContextMenu);
|
||||||
QList<YACReaderLibraryItemWidget *>::iterator itr;
|
QList<YACReaderLibraryItemWidget *>::iterator itr;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (itr = librariesList.begin(); itr != librariesList.end() && !naturalSortLessThanCI(name, (*itr)->name); itr++)
|
for (itr = librariesList.begin(); itr != librariesList.end() && !naturalSortLessThanCI(name, (*itr)->name); itr++)
|
||||||
|
@ -37,73 +37,73 @@ YACReaderOptionsDialog::YACReaderOptionsDialog(QWidget *parent)
|
|||||||
shortcutsBox = new QGroupBox(tr("Shortcuts"));
|
shortcutsBox = new QGroupBox(tr("Shortcuts"));
|
||||||
shortcutsBox->setLayout(shortcutsLayout);
|
shortcutsBox->setLayout(shortcutsLayout);
|
||||||
|
|
||||||
connect(shortcutsButton, SIGNAL(clicked()), this, SIGNAL(editShortcuts()));
|
connect(shortcutsButton, &QAbstractButton::clicked, this, &YACReaderOptionsDialog::editShortcuts);
|
||||||
|
|
||||||
connect(accept, SIGNAL(clicked()), this, SLOT(saveOptions()));
|
connect(accept, &QAbstractButton::clicked, this, &YACReaderOptionsDialog::saveOptions);
|
||||||
connect(cancel, SIGNAL(clicked()), this, SLOT(restoreOptions())); //TODO fix this
|
connect(cancel, SIGNAL(clicked()), this, SLOT(restoreOptions())); //TODO fix this
|
||||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
connect(cancel, &QAbstractButton::clicked, this, &QWidget::close);
|
||||||
#ifndef NO_OPENGL
|
#ifndef NO_OPENGL
|
||||||
useGL = new QCheckBox(tr("Use hardware acceleration (restart needed)"));
|
useGL = new QCheckBox(tr("Use hardware acceleration (restart needed)"));
|
||||||
connect(useGL, SIGNAL(stateChanged(int)), this, SLOT(saveUseGL(int)));
|
connect(useGL, &QCheckBox::stateChanged, this, &YACReaderOptionsDialog::saveUseGL);
|
||||||
#endif
|
#endif
|
||||||
#ifdef FORCE_ANGLE
|
#ifdef FORCE_ANGLE
|
||||||
useGL->setHidden(true);
|
useGL->setHidden(true);
|
||||||
#endif
|
#endif
|
||||||
//sw CONNECTIONS
|
//sw CONNECTIONS
|
||||||
connect(sw->radio1, SIGNAL(toggled(bool)), this, SLOT(setClassicConfigSW()));
|
connect(sw->radio1, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setClassicConfigSW);
|
||||||
connect(sw->radio2, SIGNAL(toggled(bool)), this, SLOT(setStripeConfigSW()));
|
connect(sw->radio2, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setStripeConfigSW);
|
||||||
connect(sw->radio3, SIGNAL(toggled(bool)), this, SLOT(setOverlappedStripeConfigSW()));
|
connect(sw->radio3, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setOverlappedStripeConfigSW);
|
||||||
#ifndef NO_OPENGL
|
#ifndef NO_OPENGL
|
||||||
//gl CONNECTIONS
|
//gl CONNECTIONS
|
||||||
connect(gl->radioClassic, SIGNAL(toggled(bool)), this, SLOT(setClassicConfig()));
|
connect(gl->radioClassic, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setClassicConfig);
|
||||||
connect(gl->radioStripe, SIGNAL(toggled(bool)), this, SLOT(setStripeConfig()));
|
connect(gl->radioStripe, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setStripeConfig);
|
||||||
connect(gl->radioOver, SIGNAL(toggled(bool)), this, SLOT(setOverlappedStripeConfig()));
|
connect(gl->radioOver, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setOverlappedStripeConfig);
|
||||||
connect(gl->radionModern, SIGNAL(toggled(bool)), this, SLOT(setModernConfig()));
|
connect(gl->radionModern, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setModernConfig);
|
||||||
connect(gl->radioDown, SIGNAL(toggled(bool)), this, SLOT(setRouletteConfig()));
|
connect(gl->radioDown, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::setRouletteConfig);
|
||||||
|
|
||||||
connect(gl->radioClassic, SIGNAL(toggled(bool)), this, SIGNAL(optionsChanged()));
|
connect(gl->radioClassic, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
connect(gl->radioStripe, SIGNAL(toggled(bool)), this, SIGNAL(optionsChanged()));
|
connect(gl->radioStripe, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
connect(gl->radioOver, SIGNAL(toggled(bool)), this, SIGNAL(optionsChanged()));
|
connect(gl->radioOver, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
connect(gl->radionModern, SIGNAL(toggled(bool)), this, SIGNAL(optionsChanged()));
|
connect(gl->radionModern, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
connect(gl->radioDown, SIGNAL(toggled(bool)), this, SIGNAL(optionsChanged()));
|
connect(gl->radioDown, &QAbstractButton::toggled, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->xRotation, SIGNAL(valueChanged(int)), this, SLOT(saveXRotation(int)));
|
connect(gl->xRotation, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveXRotation);
|
||||||
connect(gl->xRotation, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->xRotation, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->yPosition, SIGNAL(valueChanged(int)), this, SLOT(saveYPosition(int)));
|
connect(gl->yPosition, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveYPosition);
|
||||||
connect(gl->yPosition, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->yPosition, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->coverDistance, SIGNAL(valueChanged(int)), this, SLOT(saveCoverDistance(int)));
|
connect(gl->coverDistance, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveCoverDistance);
|
||||||
connect(gl->coverDistance, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->coverDistance, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->centralDistance, SIGNAL(valueChanged(int)), this, SLOT(saveCentralDistance(int)));
|
connect(gl->centralDistance, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveCentralDistance);
|
||||||
connect(gl->centralDistance, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->centralDistance, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->zoomLevel, SIGNAL(valueChanged(int)), this, SLOT(saveZoomLevel(int)));
|
connect(gl->zoomLevel, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveZoomLevel);
|
||||||
connect(gl->zoomLevel, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->zoomLevel, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->yCoverOffset, SIGNAL(valueChanged(int)), this, SLOT(saveYCoverOffset(int)));
|
connect(gl->yCoverOffset, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveYCoverOffset);
|
||||||
connect(gl->yCoverOffset, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->yCoverOffset, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->zCoverOffset, SIGNAL(valueChanged(int)), this, SLOT(saveZCoverOffset(int)));
|
connect(gl->zCoverOffset, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveZCoverOffset);
|
||||||
connect(gl->zCoverOffset, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->zCoverOffset, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->coverRotation, SIGNAL(valueChanged(int)), this, SLOT(saveCoverRotation(int)));
|
connect(gl->coverRotation, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveCoverRotation);
|
||||||
connect(gl->coverRotation, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->coverRotation, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->fadeOutDist, SIGNAL(valueChanged(int)), this, SLOT(saveFadeOutDist(int)));
|
connect(gl->fadeOutDist, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveFadeOutDist);
|
||||||
connect(gl->fadeOutDist, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->fadeOutDist, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->lightStrength, SIGNAL(valueChanged(int)), this, SLOT(saveLightStrength(int)));
|
connect(gl->lightStrength, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveLightStrength);
|
||||||
connect(gl->lightStrength, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->lightStrength, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->maxAngle, SIGNAL(valueChanged(int)), this, SLOT(saveMaxAngle(int)));
|
connect(gl->maxAngle, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::saveMaxAngle);
|
||||||
connect(gl->maxAngle, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->maxAngle, &YACReaderSpinSliderWidget::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->performanceSlider, SIGNAL(valueChanged(int)), this, SLOT(savePerformance(int)));
|
connect(gl->performanceSlider, &QAbstractSlider::valueChanged, this, &YACReaderOptionsDialog::savePerformance);
|
||||||
connect(gl->performanceSlider, SIGNAL(valueChanged(int)), this, SIGNAL(optionsChanged()));
|
connect(gl->performanceSlider, &QAbstractSlider::valueChanged, this, &YACReaderOptionsDialog::optionsChanged);
|
||||||
|
|
||||||
connect(gl->vSyncCheck, SIGNAL(stateChanged(int)), this, SLOT(saveUseVSync(int)));
|
connect(gl->vSyncCheck, &QCheckBox::stateChanged, this, &YACReaderOptionsDialog::saveUseVSync);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ YACReaderSearchLineEdit::YACReaderSearchLineEdit(QWidget *parent)
|
|||||||
clearButton->setCursor(Qt::ArrowCursor);
|
clearButton->setCursor(Qt::ArrowCursor);
|
||||||
clearButton->setStyleSheet("QToolButton { border: none; padding: 0px; }");
|
clearButton->setStyleSheet("QToolButton { border: none; padding: 0px; }");
|
||||||
clearButton->hide();
|
clearButton->hide();
|
||||||
connect(clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
connect(clearButton, &QAbstractButton::clicked, this, &QLineEdit::clear);
|
||||||
connect(this, SIGNAL(textChanged(const QString &)), this, SLOT(updateCloseButton(const QString &)));
|
connect(this, &QLineEdit::textChanged, this, &YACReaderSearchLineEdit::updateCloseButton);
|
||||||
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
setStyleSheet(QString("QLineEdit {border-top:1px solid #9F9F9F; border-bottom:1px solid #ACACAC; border-right:1px solid #ACACAC; border-left:1px solid #ACACAC; border-radius: 10px; background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CACACA, stop: 0.15 #FFFFFF); padding-left: %1px; padding-right: %2px; padding-bottom: 1px; margin-bottom: 1px;} ").arg(searchLabel->sizeHint().width() + frameWidth + 6).arg(clearButton->sizeHint().width() + frameWidth + 2));
|
setStyleSheet(QString("QLineEdit {border-top:1px solid #9F9F9F; border-bottom:1px solid #ACACAC; border-right:1px solid #ACACAC; border-left:1px solid #ACACAC; border-radius: 10px; background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CACACA, stop: 0.15 #FFFFFF); padding-left: %1px; padding-right: %2px; padding-bottom: 1px; margin-bottom: 1px;} ").arg(searchLabel->sizeHint().width() + frameWidth + 6).arg(clearButton->sizeHint().width() + frameWidth + 2));
|
||||||
@ -67,14 +67,14 @@ YACReaderSearchLineEdit::YACReaderSearchLineEdit(QWidget *parent)
|
|||||||
setValidator(validator);
|
setValidator(validator);
|
||||||
setCompleter(modifiersCompleter);
|
setCompleter(modifiersCompleter);
|
||||||
|
|
||||||
connect(this, SIGNAL(textChanged(QString)), this, SLOT(processText(QString)));
|
connect(this, &QLineEdit::textChanged, this, &YACReaderSearchLineEdit::processText);
|
||||||
}
|
}
|
||||||
|
|
||||||
void YACReaderSearchLineEdit::clearText()
|
void YACReaderSearchLineEdit::clearText()
|
||||||
{
|
{
|
||||||
disconnect(this, SIGNAL(textChanged(QString)), this, SLOT(processText(QString)));
|
disconnect(this, &QLineEdit::textChanged, this, &YACReaderSearchLineEdit::processText);
|
||||||
clear();
|
clear();
|
||||||
connect(this, SIGNAL(textChanged(QString)), this, SLOT(processText(QString)));
|
connect(this, &QLineEdit::textChanged, this, &YACReaderSearchLineEdit::processText);
|
||||||
}
|
}
|
||||||
|
|
||||||
//modifiers are not returned
|
//modifiers are not returned
|
||||||
|
@ -23,12 +23,12 @@ YACReaderSpinSliderWidget::YACReaderSpinSliderWidget(QWidget *parent, bool strec
|
|||||||
}
|
}
|
||||||
|
|
||||||
connect(spinBox, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int)));
|
connect(spinBox, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int)));
|
||||||
connect(slider, SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int)));
|
connect(slider, &QAbstractSlider::valueChanged, spinBox, &QSpinBox::setValue);
|
||||||
|
|
||||||
connect(slider, SIGNAL(valueChanged(int)), this, SLOT(valueWillChange(int)));
|
connect(slider, &QAbstractSlider::valueChanged, this, &YACReaderSpinSliderWidget::valueWillChange);
|
||||||
connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(valueWillChangeFromSpinBox(int)));
|
connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(valueWillChangeFromSpinBox(int)));
|
||||||
|
|
||||||
connect(slider, SIGNAL(sliderReleased()), this, SLOT(sliderRelease()));
|
connect(slider, &QAbstractSlider::sliderReleased, this, &YACReaderSpinSliderWidget::sliderRelease);
|
||||||
|
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
}
|
}
|
||||||
|
@ -271,10 +271,10 @@ QWidget *YACReaderRatingDelegate::createEditor(QWidget *parent,
|
|||||||
Q_UNUSED(option)
|
Q_UNUSED(option)
|
||||||
Q_UNUSED(index)
|
Q_UNUSED(index)
|
||||||
StarEditor *editor = new StarEditor(parent);
|
StarEditor *editor = new StarEditor(parent);
|
||||||
connect(editor, SIGNAL(editingFinished()),
|
connect(editor, &StarEditor::editingFinished,
|
||||||
this, SLOT(sendCloseEditor()));
|
this, &YACReaderRatingDelegate::sendCloseEditor);
|
||||||
connect(editor, SIGNAL(commitData()),
|
connect(editor, &StarEditor::commitData,
|
||||||
this, SLOT(sendCommitData()));
|
this, &YACReaderRatingDelegate::sendCommitData);
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void YACReaderTreeView::dragMoveEvent(QDragMoveEvent *event)
|
|||||||
QModelIndex underMouse = indexAt(event->pos());
|
QModelIndex underMouse = indexAt(event->pos());
|
||||||
if (underMouse.isValid()) {
|
if (underMouse.isValid()) {
|
||||||
expandPos = event->pos();
|
expandPos = event->pos();
|
||||||
connect(&expandTimer, SIGNAL(timeout()), this, SLOT(expandCurrent()));
|
connect(&expandTimer, &QTimer::timeout, this, &YACReaderTreeView::expandCurrent);
|
||||||
expandTimer.setSingleShot(true);
|
expandTimer.setSingleShot(true);
|
||||||
expandTimer.start(500);
|
expandTimer.start(500);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ QWidget *EditShortcutItemDelegate::createEditor(QWidget *parent, const QStyleOpt
|
|||||||
Q_UNUSED(index);
|
Q_UNUSED(index);
|
||||||
|
|
||||||
KeySequenceLineEdit *editor = new KeySequenceLineEdit(parent);
|
KeySequenceLineEdit *editor = new KeySequenceLineEdit(parent);
|
||||||
connect(editor, SIGNAL(editingFinished()), this, SLOT(closeShortcutEditor()));
|
connect(editor, &QLineEdit::editingFinished, this, &EditShortcutItemDelegate::closeShortcutEditor);
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ KeySequenceLineEdit::KeySequenceLineEdit(QWidget *parent)
|
|||||||
acceptButton->setCursor(Qt::ArrowCursor);
|
acceptButton->setCursor(Qt::ArrowCursor);
|
||||||
acceptButton->setStyleSheet(buttonsStyle);
|
acceptButton->setStyleSheet(buttonsStyle);
|
||||||
|
|
||||||
connect(clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
connect(clearButton, &QAbstractButton::clicked, this, &QLineEdit::clear);
|
||||||
connect(acceptButton, SIGNAL(clicked()), this, SIGNAL(editingFinished()));
|
connect(acceptButton, &QAbstractButton::clicked, this, &QLineEdit::editingFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeySequenceLineEdit::resizeEvent(QResizeEvent *e)
|
void KeySequenceLineEdit::resizeEvent(QResizeEvent *e)
|
||||||
|
@ -57,9 +57,9 @@ EditShortcutsDialog::EditShortcutsDialog(QWidget *parent)
|
|||||||
"QTableView::item:selected {outline: 0px; border: 0px;}"
|
"QTableView::item:selected {outline: 0px; border: 0px;}"
|
||||||
"");*/
|
"");*/
|
||||||
|
|
||||||
connect(resetButton, SIGNAL(clicked()), this, SLOT(resetToDefaults()));
|
connect(resetButton, &QAbstractButton::clicked, this, &EditShortcutsDialog::resetToDefaults);
|
||||||
connect(actionsGroupsListView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), this, SLOT(loadShortcuts(QModelIndex, QModelIndex))); //clicked(QModelIndex) doesn't work :S
|
connect(actionsGroupsListView->selectionModel(), &QItemSelectionModel::currentChanged, this, &EditShortcutsDialog::loadShortcuts); //clicked(QModelIndex) doesn't work :S
|
||||||
connect(actionsModel, SIGNAL(conflict(QString)), this, SLOT(processConflict(QString)));
|
connect(actionsModel, &ActionsShortcutsModel::conflict, this, &EditShortcutsDialog::processConflict);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
setFixedSize(760, 500);
|
setFixedSize(760, 500);
|
||||||
|
@ -32,10 +32,10 @@ HttpConnectionHandler::HttpConnectionHandler(const QSettings *settings, HttpRequ
|
|||||||
socket->moveToThread(thread);
|
socket->moveToThread(thread);
|
||||||
|
|
||||||
// Connect signals
|
// Connect signals
|
||||||
connect(socket, SIGNAL(readyRead()), SLOT(read()));
|
connect(socket, &QIODevice::readyRead, this, &HttpConnectionHandler::read);
|
||||||
connect(socket, SIGNAL(disconnected()), SLOT(disconnected()));
|
connect(socket, &QAbstractSocket::disconnected, this, &HttpConnectionHandler::disconnected);
|
||||||
connect(&readTimer, SIGNAL(timeout()), SLOT(readTimeout()));
|
connect(&readTimer, &QTimer::timeout, this, &HttpConnectionHandler::readTimeout);
|
||||||
connect(thread, SIGNAL(finished()), this, SLOT(thread_done()));
|
connect(thread, &QThread::finished, this, &HttpConnectionHandler::thread_done);
|
||||||
|
|
||||||
qDebug("HttpConnectionHandler (%p): constructed", static_cast<void*>(this));
|
qDebug("HttpConnectionHandler (%p): constructed", static_cast<void*>(this));
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ HttpConnectionHandlerPool::HttpConnectionHandlerPool(const QSettings *settings,
|
|||||||
this->sslConfiguration=NULL;
|
this->sslConfiguration=NULL;
|
||||||
loadSslConfig();
|
loadSslConfig();
|
||||||
cleanupTimer.start(settings->value("cleanupInterval",1000).toInt());
|
cleanupTimer.start(settings->value("cleanupInterval",1000).toInt());
|
||||||
connect(&cleanupTimer, SIGNAL(timeout()), SLOT(cleanup()));
|
connect(&cleanupTimer, &QTimer::timeout, this, &HttpConnectionHandlerPool::cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ void HttpListener::incomingConnection(tSocketDescriptor socketDescriptor) {
|
|||||||
qDebug("HttpListener: Too many incoming connections");
|
qDebug("HttpListener: Too many incoming connections");
|
||||||
QTcpSocket* socket=new QTcpSocket(this);
|
QTcpSocket* socket=new QTcpSocket(this);
|
||||||
socket->setSocketDescriptor(socketDescriptor);
|
socket->setSocketDescriptor(socketDescriptor);
|
||||||
connect(socket, SIGNAL(disconnected()), socket, SLOT(deleteLater()));
|
connect(socket, &QAbstractSocket::disconnected, socket, &QObject::deleteLater);
|
||||||
socket->write("HTTP/1.1 503 too many connections\r\nConnection: close\r\n\r\nToo many connections\r\n");
|
socket->write("HTTP/1.1 503 too many connections\r\nConnection: close\r\n\r\nToo many connections\r\n");
|
||||||
socket->disconnectFromHost();
|
socket->disconnectFromHost();
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ HttpSessionStore::HttpSessionStore(const QSettings *settings, QObject* parent)
|
|||||||
:QObject(parent)
|
:QObject(parent)
|
||||||
{
|
{
|
||||||
this->settings=settings;
|
this->settings=settings;
|
||||||
connect(&cleanupTimer,SIGNAL(timeout()),this,SLOT(sessionTimerEvent()));
|
connect(&cleanupTimer,&QTimer::timeout,this,&HttpSessionStore::sessionTimerEvent);
|
||||||
cleanupTimer.start(60000);
|
cleanupTimer.start(60000);
|
||||||
cookieName=settings->value("cookieName","sessionid").toByteArray();
|
cookieName=settings->value("cookieName","sessionid").toByteArray();
|
||||||
expirationTime=settings->value("expirationTime",3600000).toInt();
|
expirationTime=settings->value("expirationTime",3600000).toInt();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user