mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1198128 - Fix -Wshadow warnings in widget/gtk. r=karlt
This commit is contained in:
parent
cc68dfd296
commit
56b5f84f85
@ -2719,13 +2719,11 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
|
||||
}
|
||||
case MOZ_GTK_TREE_HEADER_CELL:
|
||||
{
|
||||
/* A Tree Header in GTK is just a different styled button
|
||||
/* A Tree Header in GTK is just a different styled button
|
||||
* It must be placed in a TreeView for getting the correct style
|
||||
* assigned.
|
||||
* That is why the following code is the same as for MOZ_GTK_BUTTON.
|
||||
* That is why the following code is the same as for MOZ_GTK_BUTTON.
|
||||
* */
|
||||
GtkStyleContext *style;
|
||||
|
||||
ensure_tree_header_cell_widget();
|
||||
*left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gTreeHeaderCellWidget));
|
||||
|
||||
|
@ -60,6 +60,9 @@ if CONFIG['MOZ_X11']:
|
||||
'nsDragService.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['GNU_CC']:
|
||||
CFLAGS += ['-Wshadow']
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
if CONFIG['ACCESSIBILITY']:
|
||||
|
@ -529,9 +529,8 @@ nsClipboard::SelectionGetEvent(GtkClipboard *aClipboard,
|
||||
nsCOMPtr<nsISupports> item;
|
||||
uint32_t len;
|
||||
|
||||
|
||||
GdkAtom selectionTarget = gtk_selection_data_get_target(aSelectionData);
|
||||
|
||||
|
||||
// Check to see if the selection data includes any of the string
|
||||
// types that we support.
|
||||
if (selectionTarget == gdk_atom_intern ("STRING", FALSE) ||
|
||||
@ -569,12 +568,11 @@ nsClipboard::SelectionGetEvent(GtkClipboard *aClipboard,
|
||||
// Look through our transfer data for the image
|
||||
static const char* const imageMimeTypes[] = {
|
||||
kNativeImageMime, kPNGImageMime, kJPEGImageMime, kJPGImageMime, kGIFImageMime };
|
||||
nsCOMPtr<nsISupports> item;
|
||||
uint32_t len;
|
||||
nsCOMPtr<nsISupports> imageItem;
|
||||
nsCOMPtr<nsISupportsInterfacePointer> ptrPrimitive;
|
||||
for (uint32_t i = 0; !ptrPrimitive && i < ArrayLength(imageMimeTypes); i++) {
|
||||
rv = trans->GetTransferData(imageMimeTypes[i], getter_AddRefs(item), &len);
|
||||
ptrPrimitive = do_QueryInterface(item);
|
||||
rv = trans->GetTransferData(imageMimeTypes[i], getter_AddRefs(imageItem), &len);
|
||||
ptrPrimitive = do_QueryInterface(imageItem);
|
||||
}
|
||||
if (!ptrPrimitive)
|
||||
return;
|
||||
|
@ -784,8 +784,8 @@ nsDragService::GetData(nsITransferable * aTransferable,
|
||||
if (convertedText) {
|
||||
nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
|
||||
nsCOMPtr<nsIURI> fileURI;
|
||||
nsresult rv = ioService->NewURI(NS_ConvertUTF16toUTF8(convertedText),
|
||||
nullptr, nullptr, getter_AddRefs(fileURI));
|
||||
rv = ioService->NewURI(NS_ConvertUTF16toUTF8(convertedText),
|
||||
nullptr, nullptr, getter_AddRefs(fileURI));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(fileURI, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -2394,8 +2394,6 @@ nsWindow::OnSizeAllocate(GtkAllocation *aAllocation)
|
||||
if (mBounds.Size() == size)
|
||||
return;
|
||||
|
||||
nsIntRect rect;
|
||||
|
||||
// Invalidate the new part of the window now for the pending paint to
|
||||
// minimize background flashes (GDK does not do this for external resizes
|
||||
// of toplevels.)
|
||||
|
Loading…
Reference in New Issue
Block a user