This file is indexed.

/usr/include/KF5/KIOWidgets/kio/paste.h is in libkf5kio-dev 5.28.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
/* This file is part of the KDE libraries
   Copyright (C) 2000-2005 David Faure <faure@kde.org>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License version 2 as published by the Free Software Foundation.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef KIO_PASTE_H
#define KIO_PASTE_H

#include "kiowidgets_export.h"
#include <QtCore/QString>
class QWidget;
class QUrl;
class QMimeData;
class KFileItem;

namespace KIO
{
class Job;
class CopyJob;

/**
 * Pastes the content of the clipboard to the given destination URL.
 * URLs are treated separately (performing a file copy)
 * from other data (which is saved into a file after asking the user
 * to choose a filename and the preferred data format)
 *
 * @param destURL the URL to receive the data
 * @param widget parent widget to use for dialogs
 * @param move true to move the data, false to copy -- now ignored and handled automatically
 * @return the job that handles the operation
 * @deprecated since 5.4, use KIO::paste() from <KIO/PasteJob> (which takes care of undo/redo too)
 */
KIOWIDGETS_DEPRECATED_EXPORT Job *pasteClipboard(const QUrl &destURL, QWidget *widget, bool move = false);

/**
 * Save the given mime @p data to the given destination URL
 * after offering the user to choose a data format.
 * This is the method used when handling drops (of anything else than URLs)
 * onto dolphin and konqueror.
 *
 * @param data the QMimeData, usually from a QDropEvent
 * @param destUrl the URL of the directory where the data will be pasted.
 * The filename to use in that directory is prompted by this method.
 * @param dialogText the text to show in the dialog
 * @param widget parent widget to use for dialogs
 *
 * @see pasteClipboard()
 * @deprecated since 5.4, use KIO::paste() from <KIO/PasteJob> (which takes care of undo/redo too)
 */
KIOWIDGETS_DEPRECATED_EXPORT Job *pasteMimeData(const QMimeData *data, const QUrl &destUrl,
                                     const QString &dialogText, QWidget *widget);

/**
 * Returns true if pasteMimeData will find any interesting format in @p data.
 * You can use this method to enable/disable the paste action appropriately.
 * @since 5.0 (was called canPasteMimeSource before)
 */
KIOWIDGETS_EXPORT bool canPasteMimeData(const QMimeData *data);

/**
 * Returns the text to use for the Paste action, when the application supports
 * pasting files, urls, and clipboard data, using pasteClipboard().
 * @return a string suitable for QAction::setText, or an empty string if pasting
 * isn't possible right now.
 * @deprecated since 5.4, use pasteActionText(const QMimeData *, bool*, const KFileItem &)
 */
KIOWIDGETS_DEPRECATED_EXPORT QString pasteActionText();

/**
 * Returns the text to use for the Paste action, when the application supports
 * pasting files, urls, and clipboard data, using pasteClipboard().
 * @param mimeData the mime data, usually QApplication::clipboard()->mimeData().
 * @param enable output parameter, to be passed to QAction::setEnabled.
 *      The pointer must be non-null, and in return the function will always set its value.
 * @param destItem item representing the directory into which the clipboard data
 *        or items would be pasted. Used to find out about permissions in that directory.
 * @return a string suitable for QAction::setText
 * @since 5.4
 */
KIOWIDGETS_EXPORT QString pasteActionText(const QMimeData *mimeData, bool *enable, const KFileItem &destItem);

/**
 * Add the information whether the files were cut, into the mimedata.
 * @param mimeData pointer to the mimeData object to be populated. Must not be null.
 * @param cut if true, the user selected "cut" (saved as application/x-kde-cutselection in the mimedata).
 * @since 5.2
 */
KIOWIDGETS_EXPORT void setClipboardDataCut(QMimeData* mimeData, bool cut);

/**
 * Returns true if the URLs in @p mimeData were cut by the user.
 * This should be called when pasting, to choose between moving and copying.
 * @since 5.2
 */
KIOWIDGETS_EXPORT bool isClipboardDataCut(const QMimeData *mimeData);

}

#endif