Skip to content
Permalink
Browse files

Fix various shadow warnings in mumble by renaming

  • Loading branch information...
hacst committed Oct 25, 2015
1 parent 3206530 commit f9b2db459b6bb55410279fea904c2ef8391d66ba
@@ -273,10 +273,10 @@ void ACLEditor::accept() {
needs_update = true;
}
if (rteChannelDescription->isModified() && (pChannel->qsDesc != rteChannelDescription->text())) {
const QString &msg = rteChannelDescription->text();
mpcs.set_description(u8(msg));
const QString &descriptionText = rteChannelDescription->text();
mpcs.set_description(u8(descriptionText));
needs_update = true;
Database::setBlob(sha1(msg), msg.toUtf8());
Database::setBlob(sha1(descriptionText), descriptionText.toUtf8());
}
if (pChannel->iPosition != qsbChannelPosition->value()) {
mpcs.set_position(qsbChannelPosition->value());
@@ -48,37 +48,37 @@ extern "C" {
};
#endif

CELTCodec::CELTCodec(const QString &version) {
CELTCodec::CELTCodec(const QString &celt_version) {
bValid = false;
cmMode = NULL;
qsVersion = version;
qsVersion = celt_version;
iBitstreamVersion = INT_MIN;
qlCELT.setLoadHints(QLibrary::ResolveAllSymbolsHint);

QStringList alternatives;
#if defined(Q_OS_MAC)
alternatives << QString::fromLatin1("libcelt0.%1.dylib").arg(version);
alternatives << QString::fromLatin1("celt0.%1.dylib").arg(version);
alternatives << QString::fromLatin1("libcelt.%1.dylib").arg(version);
alternatives << QString::fromLatin1("celt.%1.dylib").arg(version);
alternatives << QString::fromLatin1("libcelt0.%1.dylib").arg(celt_version);
alternatives << QString::fromLatin1("celt0.%1.dylib").arg(celt_version);
alternatives << QString::fromLatin1("libcelt.%1.dylib").arg(celt_version);
alternatives << QString::fromLatin1("celt.%1.dylib").arg(celt_version);
#elif defined(Q_OS_UNIX)
alternatives << QString::fromLatin1("libcelt0.so.%1").arg(version);
alternatives << QString::fromLatin1("libcelt.so.%1").arg(version);
alternatives << QString::fromLatin1("celt.so.%1").arg(version);
alternatives << QString::fromLatin1("libcelt0.so.%1").arg(celt_version);
alternatives << QString::fromLatin1("libcelt.so.%1").arg(celt_version);
alternatives << QString::fromLatin1("celt.so.%1").arg(celt_version);
#else
int cpuinfo[4];
__cpuid(cpuinfo, 1);
if (cpuinfo[3] & 0x02000000) {
if (cpuinfo[3] & 0x04000000) {
if (cpuinfo[2] & 0x00000001) {
alternatives << QString::fromLatin1("celt0.%1.sse3.dll").arg(version);
alternatives << QString::fromLatin1("celt0.%1.sse3.dll").arg(celt_version);
}
alternatives << QString::fromLatin1("celt0.%1.sse2.dll").arg(version);
alternatives << QString::fromLatin1("celt0.%1.sse2.dll").arg(celt_version);
}
alternatives << QString::fromLatin1("celt0.%1.sse.dll").arg(version);
alternatives << QString::fromLatin1("celt0.%1.sse.dll").arg(celt_version);
}

alternatives << QString::fromLatin1("celt0.%1.dll").arg(version);
alternatives << QString::fromLatin1("celt0.%1.dll").arg(celt_version);
#endif
foreach(const QString &lib, alternatives) {
qlCELT.setFileName(MumbleApplication::instance()->applicationVersionRootPath() + QLatin1String("/") + lib);
@@ -144,7 +144,7 @@ void CELTCodec::report() const {
qWarning("CELT bitstream %08x from %s", bitstreamVersion(), qPrintable(qlCELT.fileName()));
}

CELTCodec070::CELTCodec070(const QString &version) : CELTCodec(version) {
CELTCodec070::CELTCodec070(const QString &celt_version) : CELTCodec(celt_version) {
RESOLVE(celt_mode_create);
RESOLVE(celt_encoder_create);
RESOLVE(celt_decoder_create);
@@ -175,7 +175,7 @@ int CELTCodec070::decode_float(CELTDecoder *st, const unsigned char *data, int l
return celt_decode_float(st, data, len, pcm);
}

CELTCodec011::CELTCodec011(const QString &version) : CELTCodec(version) {
CELTCodec011::CELTCodec011(const QString &celt_version) : CELTCodec(celt_version) {
RESOLVE(celt_mode_create);
RESOLVE(celt_encoder_create_custom);
RESOLVE(celt_decoder_create_custom);
@@ -61,7 +61,7 @@ class CELTCodec {
void (__cdecl *celt_decoder_destroy)(CELTDecoder *st);
int (__cdecl *celt_decoder_ctl)(CELTDecoder * st, int request, ...);

CELTCodec(const QString &version);
CELTCodec(const QString &celt_version);
virtual ~CELTCodec();
bool isValid() const;
int bitstreamVersion() const;
@@ -86,7 +86,7 @@ class CELTCodec070 : public CELTCodec {
int (__cdecl *celt_decode)(CELTDecoder *st, const unsigned char *data, int len, celt_int16 *pcm);
const char *(__cdecl *celt_strerror)(int error);
public:
CELTCodec070(const QString &version);
CELTCodec070(const QString &celt_version);
CELTEncoder *encoderCreate() Q_DECL_OVERRIDE;
CELTDecoder *decoderCreate() Q_DECL_OVERRIDE;
int encode(CELTEncoder *st, const celt_int16 *pcm, unsigned char *compressed, int nbCompressedBytes) Q_DECL_OVERRIDE;
@@ -104,7 +104,7 @@ class CELTCodec011 : public CELTCodec {
int (__cdecl *celt_decode)(CELTDecoder *st, const unsigned char *data, int len, celt_int16 *pcm, int frame_size);
const char *(__cdecl *celt_strerror)(int error);
public:
CELTCodec011(const QString &version);
CELTCodec011(const QString &celt_version);
CELTEncoder *encoderCreate() Q_DECL_OVERRIDE;
CELTDecoder *decoderCreate() Q_DECL_OVERRIDE;
int encode(CELTEncoder *st, const celt_int16 *pcm, unsigned char *compressed, int nbCompressedBytes) Q_DECL_OVERRIDE;
@@ -175,11 +175,11 @@ void ConfigDialog::on_qcbExpert_clicked(bool b) {
qlwIcons->clear();

QFontMetrics qfm(qlwIcons->font());
int width = 0;
int configNavbarWidth = 0;

foreach(ConfigWidget *cw, qmWidgets) {
bool showit = cw->expert(b);
width = qMax(width, qfm.width(cw->title()));
configNavbarWidth = qMax(configNavbarWidth, qfm.width(cw->title()));
if (showit || b) {
QListWidgetItem *i = new QListWidgetItem(qlwIcons);
i->setIcon(cw->icon());
@@ -194,10 +194,10 @@ void ConfigDialog::on_qcbExpert_clicked(bool b) {
}

// Add space for icon and some padding.
width += qlwIcons->iconSize().width() + 25;
configNavbarWidth += qlwIcons->iconSize().width() + 25;

qlwIcons->setMinimumWidth(width);
qlwIcons->setMaximumWidth(width);
qlwIcons->setMinimumWidth(configNavbarWidth);
qlwIcons->setMaximumWidth(configNavbarWidth);

if (sel)
qlwIcons->setCurrentItem(sel);
@@ -1593,14 +1593,14 @@ void ConnectDialog::udpReply() {
}
}

void ConnectDialog::fetched(QByteArray data, QUrl, QMap<QString, QString> headers) {
if (data.isNull()) {
void ConnectDialog::fetched(QByteArray xmlData, QUrl, QMap<QString, QString> headers) {
if (xmlData.isNull()) {
QMessageBox::warning(this, QLatin1String("Mumble"), tr("Failed to fetch server list"), QMessageBox::Ok);
return;
}

QDomDocument doc;
doc.setContent(data);
doc.setContent(xmlData);

qlPublicServers.clear();
qsUserCountry = headers.value(QLatin1String("Geo-Country"));
@@ -279,7 +279,7 @@ class ConnectDialog : public QDialog, public Ui::ConnectDialog {
void stopDns(ServerItem *);
public slots:
void accept();
void fetched(QByteArray, QUrl, QMap<QString, QString>);
void fetched(QByteArray xmlData, QUrl, QMap<QString, QString>);

void udpReply();
void lookedUp(QHostInfo);
@@ -61,8 +61,8 @@ int LogTextBrowser::getLogScrollMaximum() {
return verticalScrollBar()->maximum();
}

void LogTextBrowser::setLogScroll(int pos) {
verticalScrollBar()->setValue(pos);
void LogTextBrowser::setLogScroll(int scroll_pos) {
verticalScrollBar()->setValue(scroll_pos);
}

void LogTextBrowser::scrollLogToBottom() {
@@ -56,7 +56,7 @@ class LogTextBrowser : public QTextBrowser {

int getLogScroll();
int getLogScrollMaximum();
void setLogScroll(int pos);
void setLogScroll(int scroll_pos);
void scrollLogToBottom();
};

@@ -280,12 +280,12 @@ ShortcutTargetDialog::ShortcutTargetDialog(const ShortcutTarget &st, QWidget *pw
root->setExpanded(true);
qmTree.insert(-1, root);

QTreeWidgetItem *pitem = new QTreeWidgetItem(root, QStringList(tr("Parent")));
pitem->setData(0, Qt::UserRole, SHORTCUT_TARGET_PARENT);
pitem->setExpanded(true);
qmTree.insert(-2, pitem);
QTreeWidgetItem *parent_item = new QTreeWidgetItem(root, QStringList(tr("Parent")));
parent_item->setData(0, Qt::UserRole, SHORTCUT_TARGET_PARENT);
parent_item->setExpanded(true);
qmTree.insert(-2, parent_item);

QTreeWidgetItem *current = new QTreeWidgetItem(pitem, QStringList(tr("Current")));
QTreeWidgetItem *current = new QTreeWidgetItem(parent_item, QStringList(tr("Current")));
current->setData(0, Qt::UserRole, SHORTCUT_TARGET_CURRENT);
qmTree.insert(-3, current);

@@ -296,7 +296,7 @@ ShortcutTargetDialog::ShortcutTargetDialog(const ShortcutTarget &st, QWidget *pw
}

for (int i = 0; i < 8; ++i) {
QTreeWidgetItem *psub = new QTreeWidgetItem(pitem, QStringList(UPARROW + tr("Subchannel #%1").arg(i+1)));
QTreeWidgetItem *psub = new QTreeWidgetItem(parent_item, QStringList(UPARROW + tr("Subchannel #%1").arg(i+1)));
psub->setData(0, Qt::UserRole, SHORTCUT_TARGET_PARENT_SUBCHANNEL - i);
qmTree.insert(SHORTCUT_TARGET_PARENT_SUBCHANNEL - i, psub);
}
@@ -559,15 +559,15 @@ GlobalShortcutConfig::GlobalShortcutConfig(Settings &st) : ConfigWidget(st) {
qcbEnableGlobalShortcuts->setVisible(canDisable);
}

bool GlobalShortcutConfig::eventFilter(QObject* /*object*/, QEvent *event) {
bool GlobalShortcutConfig::eventFilter(QObject* /*object*/, QEvent *e) {
#ifdef Q_OS_MAC
if (event->type() == QEvent::WindowActivate) {
if (e->type() == QEvent::WindowActivate) {
if (! g.s.bSuppressMacEventTapWarning) {
qwWarningContainer->setVisible(showWarning());
}
}
#else
Q_UNUSED(event)
Q_UNUSED(e)
#endif
return false;
}
@@ -134,13 +134,13 @@ void OverlayUser::updateLayout() {
qgpiChannel->setZValue(3.0f);
qgpiChannel->setOpacity(os->fChannel);

QRectF children = os->qrfAvatar | os->qrfChannel | os->qrfMutedDeafened | os->qrfUserName;
QRectF childrenBounds = os->qrfAvatar | os->qrfChannel | os->qrfMutedDeafened | os->qrfUserName;

bool haspen = (os->qcBoxPen != os->qcBoxFill) && (! qFuzzyCompare(os->qcBoxPen.alphaF(), static_cast<qreal>(0.0f)));
qreal pw = haspen ? qMax<qreal>(1.0f, os->fBoxPenWidth * uiSize * os->fZoom) : 0.0f;
qreal pad = os->fBoxPad * uiSize * os->fZoom;
QPainterPath pp;
pp.addRoundedRect(children.x() * uiSize * os->fZoom + -pw / 2.0f - pad, children.y() * uiSize * os->fZoom + -pw / 2.0f - pad, children.width() * uiSize * os->fZoom + pw + 2.0f * pad, children.height() * uiSize * os->fZoom + pw + 2.0f * pad, 2.0f * pw, 2.0f * pw);
pp.addRoundedRect(childrenBounds.x() * uiSize * os->fZoom + -pw / 2.0f - pad, childrenBounds.y() * uiSize * os->fZoom + -pw / 2.0f - pad, childrenBounds.width() * uiSize * os->fZoom + pw + 2.0f * pad, childrenBounds.height() * uiSize * os->fZoom + pw + 2.0f * pad, 2.0f * pw, 2.0f * pw);
qgpiBox->setPath(pp);
qgpiBox->setPos(0.0f, 0.0f);
qgpiBox->setZValue(-1.0f);
@@ -4,8 +4,8 @@

#include "Global.h"

PTTButtonWidget::PTTButtonWidget(QWidget *parent) :
QWidget(parent) {
PTTButtonWidget::PTTButtonWidget(QWidget *p) :
QWidget(p) {
setupUi(this);

setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint);
@@ -15,9 +15,9 @@ PTTButtonWidget::PTTButtonWidget(QWidget *parent) :
}
}

void PTTButtonWidget::closeEvent(QCloseEvent *event) {
void PTTButtonWidget::closeEvent(QCloseEvent *e) {
g.s.qbaPTTButtonWindowGeometry = saveGeometry();
QWidget::closeEvent(event);
QWidget::closeEvent(e);
}

void PTTButtonWidget::on_qpbPushToTalk_pressed() {
@@ -7,9 +7,9 @@ class PTTButtonWidget : public QWidget, public Ui::qwPTTButtonWidget {
Q_OBJECT
Q_DISABLE_COPY(PTTButtonWidget)
protected:
void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
void closeEvent(QCloseEvent *e) Q_DECL_OVERRIDE;
public:
PTTButtonWidget(QWidget *parent = 0);
PTTButtonWidget(QWidget *p = 0);
public slots:
void on_qpbPushToTalk_pressed();
void on_qpbPushToTalk_released();
@@ -74,12 +74,12 @@ PluginInfo::PluginInfo() {
struct PluginFetchMeta {
QString hash;
QString path;
PluginFetchMeta(const QString &hash = QString(), const QString &path = QString());

PluginFetchMeta(const QString &hash_ = QString(), const QString &path_ = QString())
: hash(hash_)
, path(path_) { /* Empty */ }
};

PluginFetchMeta::PluginFetchMeta(const QString &hash, const QString &path) : hash(hash), path(path) {
}


PluginConfig::PluginConfig(Settings &st) : ConfigWidget(st) {
setupUi(this);
@@ -539,8 +539,8 @@ void Plugins::fetched(QByteArray data, QUrl url) {
return;

bool rescan = false;
const QString &path = url.path();
if (path == QLatin1String("/plugins.php")) {
const QString &urlPath = url.path();
if (urlPath == QLatin1String("/plugins.php")) {
qmPluginFetchMeta.clear();
QDomDocument doc;
doc.setContent(data);
@@ -627,18 +627,18 @@ void Plugins::fetched(QByteArray data, QUrl url) {
for (i = qmPluginFetchMeta.constBegin(); i != qmPluginFetchMeta.constEnd(); ++i) {
PluginFetchMeta pfm = i.value();
if (! pfm.hash.isEmpty()) {
QUrl url;
QUrl pluginDownloadUrl;
if (pfm.path.isEmpty()) {
url.setPath(QString::fromLatin1("plugins/%1").arg(i.key()));
pluginDownloadUrl.setPath(QString::fromLatin1("plugins/%1").arg(i.key()));
} else {
url.setPath(pfm.path);
pluginDownloadUrl.setPath(pfm.path);
}

WebFetch::fetch(url, this, SLOT(fetched(QByteArray,QUrl)));
WebFetch::fetch(pluginDownloadUrl, this, SLOT(fetched(QByteArray,QUrl)));
}
}
} else {
QString fname = QFileInfo(path).fileName();
QString fname = QFileInfo(urlPath).fileName();
if (qmPluginFetchMeta.contains(fname)) {
PluginFetchMeta pfm = qmPluginFetchMeta.value(fname);
if (pfm.hash == QLatin1String(sha1(data).toHex())) {
@@ -294,11 +294,11 @@ void RichTextEditor::on_qteRichText_textChanged() {

richToPlain();

const QString &text = qptePlainText->toPlainText();
const QString &plainText = qptePlainText->toPlainText();

bool over = true;

unsigned int imagelength = text.length();
unsigned int imagelength = plainText.length();


if (g.uiMessageLength && imagelength <= g.uiMessageLength) {
@@ -307,7 +307,7 @@ void RichTextEditor::on_qteRichText_textChanged() {
over = true;
} else {
QString qsOut;
QXmlStreamReader qxsr(QString::fromLatin1("<document>%1</document>").arg(text));
QXmlStreamReader qxsr(QString::fromLatin1("<document>%1</document>").arg(plainText));
QXmlStreamWriter qxsw(&qsOut);
while (! qxsr.atEnd()) {
switch (qxsr.readNext()) {
@@ -111,9 +111,9 @@ void SocketRPCClient::processXml() {
QDomAttr attr = attributes.item(i).toAttr();
qmRequest.insert(attr.name(), attr.value());
}
QDomNodeList children = request.childNodes();
for (int i=0;i<children.count();++i) {
QDomElement child = children.item(i).toElement();
QDomNodeList childNodes = request.childNodes();
for (int i=0;i<childNodes.count();++i) {
QDomElement child = childNodes.item(i).toElement();
if (! child.isNull())
qmRequest.insert(child.nodeName(), child.text());
}
@@ -148,10 +148,10 @@ boost::optional<ThemeInfo> ThemeInfo::load(const QDir &themeDirectory) {
return theme;
}

ThemeInfo::StyleInfo ThemeInfo::getStyle(QString name) const {
ThemeInfo::StyleInfo ThemeInfo::getStyle(QString name_) const {
Q_ASSERT(styles.contains(defaultStyle));

return styles.value(name, styles.value(defaultStyle));
return styles.value(name_, styles.value(defaultStyle));
}


@@ -97,7 +97,7 @@ class ThemeInfo {
static boost::optional<ThemeInfo> load(const QDir &themeDirectory);

/// @return Style with given name or default
StyleInfo getStyle(QString name) const;
StyleInfo getStyle(QString name_) const;

/// Ideally unique theme name. A theme with identical name can override.
QString name;

0 comments on commit f9b2db4

Please sign in to comment.
You can’t perform that action at this time.