mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Use g_set_error_literal where appropriate. Patch from bug #535947.
svn path=/trunk/; revision=7051
This commit is contained in:
@@ -164,8 +164,8 @@ g_file_output_stream_query_info (GFileOutputStream *stream,
|
||||
if (class->query_info)
|
||||
info = class->query_info (stream, attributes, cancellable, error);
|
||||
else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Stream doesn't support query_info"));
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Stream doesn't support query_info"));
|
||||
|
||||
if (cancellable)
|
||||
g_cancellable_pop_current (cancellable);
|
||||
@@ -377,8 +377,8 @@ g_file_output_stream_seek (GFileOutputStream *stream,
|
||||
|
||||
if (!class->seek)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Seek not supported on stream"));
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Seek not supported on stream"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -453,8 +453,8 @@ g_file_output_stream_truncate (GFileOutputStream *stream,
|
||||
|
||||
if (!class->truncate_fn)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Truncate not supported on stream"));
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Truncate not supported on stream"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -519,8 +519,8 @@ query_info_async_thread (GSimpleAsyncResult *res,
|
||||
if (class->query_info)
|
||||
info = class->query_info (G_FILE_OUTPUT_STREAM (object), data->attributes, cancellable, &error);
|
||||
else
|
||||
g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Stream doesn't support query_info"));
|
||||
g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
_("Stream doesn't support query_info"));
|
||||
|
||||
if (info == NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user