Qt: How to find text, while the criteria is in a QStringList?

I load a file with QTextStream, then read it line by line with readLine. Then I want to get the line which have some keywords. Then, I remove the keywords from each line, so I will get entire line minus the keywords.

I wonder if the keywords can be stored in a QStringList so I can do looping to find them. Or any other simpler way to do it?

To be clear, I want to get some data from APT cache file of Ubuntu. Similar like this:

Package: flashplugin-downloader
Priority: optional
Section: multiverse/web
Installed-Size: 41
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Bart Martens <[email protected]>
Architecture: i386
Source: flashplugin-nonfree
Version: 11.2.202.359ubuntu0.12.04.1
Depends: flashplugin-installer (>= 11.1.102.55ubuntu3)
Filename: pool/multiverse/f/flashplugin-nonfree/flashplugin-downloader_11.2.202.359ubuntu0.12.04.1_i386.deb
Size: 1832
Homepage: http://www.adobe.com/products/flashplayer.html
Description-md5: 66ea91f4e504085408ea841953dc65d0
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

Package: flashplugin-installer
Priority: optional
Section: multiverse/web
Installed-Size: 137
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Bart Martens <[email protected]>
Architecture: i386
Source: flashplugin-nonfree
Version: 11.2.202.359ubuntu0.12.04.1
Replaces: flashplugin (<< 6), flashplugin-downloader (<< 11.1.102.55ubuntu3), flashplugin-nonfree (<< 11.0.1.152ubuntu1)
Provides: flashplugin-nonfree
Depends: debconf (>= 0.5) | debconf-2.0, wget, libgtk2.0-0, fontconfig, libxt6, libxext6, libatk1.0-0, libc6, libcairo2, libexpat1, libfontconfig1, libfreetype6, libglib2.0-0, libice6, libpango1.0-0, libpng12-0, libsm6, libx11-6, libxau6, libxcursor1, libxdmcp6, libxfixes3, libxi6, libxinerama1, libxrandr2, libxrender1, zlib1g, libnss3-1d, libnspr4-0d, libcurl3 | libcurl3-gnutls, libasound2, update-notifier-common (>= 0.119ubuntu2)
Recommends: libasound2-plugins (>= 1.0.16)
Suggests: firefox, x-ttcidfont-conf, ttf-mscorefonts-installer, ttf-bitstream-vera | ttf-dejavu, ttf-xfree86-nonfree, xfs
Conflicts: flashplayer-mozilla, flashplugin (<< 6), flashplugin-nonfree (<< 11.0.1.152ubuntu1), libflashsupport
Breaks: flashplugin-downloader (<< 11.1.102.55ubuntu3)
Filename: pool/multiverse/f/flashplugin-nonfree/flashplugin-installer_11.2.202.359ubuntu0.12.04.1_i386.deb
Size: 7014
Homepage: http://www.adobe.com/products/flashplayer.html
Description-md5: a03e9ebc20ce82c05567d088e79bf750
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

I want to get lines which contains Package, Size, Filename, and Description from above file.

I don't get a proper keyword to ask Google.

EDIT:
So far, my approach is like this:

if(file.open(QIODevice::ReadOnly | QIODevice::Text))
{
    QTextStream text(&file);
    while(!text.atEnd())
    {
        QString line = text.readLine();
        foreach(QString key, criteria) //criteria is a QStringList
        {
            if(line.contains(criteria))
            {
                qDebug() << line.remove(criteria);
            }
        }
    }
}

The files to be read might have size up to 25 MB. I wonder if above code can be effective. Maybe you can teach me how to use QVector or else.

Relevant tags